You can find the file descriptor of the listen socket using 'fd' from the daemon.
https://mojolicious.org/perldoc/Mojo/Server/Daemon Make sure that the close-on-exec flag is set on that fd. That should be the default on perl, but maybe it isn't on your platform, or maybe Mojolicious for some reason clears it... https://perldoc.perl.org/Fcntl.html On Tue, 5 Feb 2019, Nuno Mota wrote: > Hi, > I'm having an issue with port bindings from my Mojolicious perl daemon. > > The thing is, I issue a restart through Mojo, which then runs a bash script > that restarts a daemon. > After this daemon starts, it's hooked on the Mojo HTTP port. Does this make > any sense? > > perl 8883 root 16u IPv4 91544 0t0 TCP *:8080 (LISTEN) > daemon 9053 root 16u IPv4 91544 0t0 TCP *:8080 (LISTEN) > > I've tried exec, system, backticks and nothing seems to properly detach the > bash script from the Mojo port hooks. > > Regards, > Nuno > >
