nimdow icon indicating copy to clipboard operation
nimdow copied to clipboard

Child processes that expect stdin will lock up the process

Open avahe-kellenberger opened this issue 3 years ago • 5 comments

Describe the bug

Have one of the autostart programs wait for stdin. It will block and the process will lock up.

Additional context

Probably can just use nohup to get around this, e.g.

nohup "$@" &>/dev/null &

Need to ensure redirection from within the user command still works as intended.

avahe-kellenberger avatar Dec 08 '21 01:12 avahe-kellenberger

@PMunch we were discussing this a while ago - have you found any way to replicate the issue? I'm trying to recreate it, but have been unsuccessful. I'm starting to wonder if this is actually a stdin issue, or if it's already been fixed (as of the latest commit to master)

avahe-kellenberger avatar Feb 12 '22 22:02 avahe-kellenberger

Haven't noticed it recently after I upgraded to the latest version. But I have modified my configuration to just start one script with nohup and that script then runs all my startup tasks..

PMunch avatar Feb 16 '22 08:02 PMunch

You could try to write a small Nim program which just writes out a whole bunch to the terminal, and then set that as a startup program. It should fill up the buffer and lock up. And I don't think it was Nimdow itself locking up was it? I think it was only that process locking up (which in my case meant that my statusbar stopped working).

PMunch avatar Feb 16 '22 08:02 PMunch

Aha, thanks for the reminder. I'll try this out.

avahe-kellenberger avatar Feb 16 '22 09:02 avahe-kellenberger

Through some testing, I've also found that processes spawned when Nimdow starts do not close when Nimdow exits.

This can lead to some undesirable behavior, since multiple instances of the same process will be running if Nimdow is "restarted".

avahe-kellenberger avatar Sep 10 '22 21:09 avahe-kellenberger