[fpc-devel] Linux Binary - Socket Output affected by SystemCtl, HELP!
ozznixon at gmail.com
Wed Jan 29 17:04:39 CET 2020
using the .sh concept:
# systemctl status coderunner
* coderunner.service - The Modern Pascal Code Running Socket Server
Loaded: loaded (/usr/lib/systemd/system/coderunner.service; enabled;
vendor preset: disabled)
Active: active (running) since Wed 2020-01-29 10:55:30 EST; 8s ago
Process: 18065 ExecStartPre=/usr/bin/rm -f /run/coderunner2.pid
Main PID: 18066 (coderunner2.sh)
|-18066 /bin/sh /usr/local/bin/coderunner2.sh
Jan 29 10:55:30 www.modernpascal.com systemd: Starting The Modern Pascal
Code Running Socket Server...
Jan 29 10:55:30 www.modernpascal.com systemd: Started The Modern Pascal
Code Running Socket Server.
So it starts - telnet 127.0.0.1 - and I get the ???? stuff still.
ls -alrt /etc/test.txt
-rw-r--r-- 1 root root 0 Jan 29 10:54 /tmp/test.txt
chmod 777 just incase...
do not make a different, I even tried, bash, and even added starting...
echo "LANG=$LANG" >>/tmp/test.txt
echo "LOCALE=$LOCALE" >>/tmp/test.txt
Nothing writes to the file when systemctl starts it. However, if I
./coderunner2.sh I get:
So, I guess try FPC 3.0.x???
On Wed, Jan 29, 2020 at 9:42 AM Nikolai Zhubr via fpc-devel <
fpc-devel at lists.freepascal.org> wrote:
> 29.01.2020 18:07, Ozz Nixon via fpc-devel:
> > 1. My code does not directly interact with any environment variables.
> > 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:
> echo "LANG=$LANG" >>/tmp/test.txt
> echo "LOCALE=$LOCALE" >>/tmp/test.txt
> export LC_ALL=C
> (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.
> > 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.
> fpc-devel maillist - fpc-devel at lists.freepascal.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the fpc-devel