[fpc-devel] Linux Binary - Socket Output affected by SystemCtl, HELP!

Ozz Nixon ozznixon at gmail.com
Wed Jan 29 16:46:01 CET 2020


> That proves the problem is unrelated to sockets. Is is related to
string/encoding handling.

Now that makes a lot more sense than the socket doing goofy magic. The
string layer in FPC doing goofy magic!

I am trying your .sh script idea now...

On Wed, Jan 29, 2020 at 9:42 AM Nikolai Zhubr via fpc-devel <
fpc-devel at lists.freepascal.org> wrote:

> Hi!
>
> 29.01.2020 18:07, Ozz Nixon via fpc-devel:
> > 1. My code does not directly interact with any environment variables.
>
> Ok.
>
> > ExecStart=/usr/local/bin/coderunner2
>
> I'd suggest, as a quick and horrible temporary hack/test, replace this
> direct binary call with a shell wrapper, lets name it e.g.
> coderunner2.sh, containing something like:
>
> #!/bin/sh
> echo "LANG=$LANG" >>/tmp/test.txt
> echo "LOCALE=$LOCALE" >>/tmp/test.txt
> export LC_ALL=C
> /usr/local/bin/coderunner2
>
> (Put it into /usr/local/bin/ as otherwise systemd might refuse it; I
> suppose the script is simple enough to be self-explanatory)
>
> > 3. I do not see anything in that file that would override socket output.
>
> Sure.
>
> > 5. per wireshark, tcpdump (if the same) - it shows '?' is being sent
> > when the daemon is managed by systemctl, and the expected 8bit is sent
> > when ran at the shell prompt.
>
> That proves the problem is unrelated to sockets. Is is related to
> string/encoding handling.
>
>
> HTH...
>
> Regards,
> Nikolai
> _______________________________________________
> fpc-devel maillist  -  fpc-devel at lists.freepascal.org
> https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-devel/attachments/20200129/bb3cc482/attachment.html>


More information about the fpc-devel mailing list