Fixes minor strange errors with X launching and SIGINT #11

Merged
merged 2 commits into from Oct 18, 2012

Conversation

Projects
None yet
2 participants
Contributor

fennekki commented Oct 18, 2012

Using nohup in cdm-xlaunch for some reason kills the X process after the timeout when launched from tty1, replaced with setsid. No side effects observed, apart from X launching now working.

cdm traps SIGINT for rather obvious reasons. This trap, however, propagates to child processes and cannot be removed by them. Unsetting any traps before calling child processes is a good idea.

I've used these fixes for a while on my own system and figured I might just as well push them here as well.

I mean, I can't be the only one with these issues, can I?

fennekki added some commits Oct 18, 2012

Update src/cdm-xlaunch
Replaced nohup with setsid: If using nohup, launching X from the first terminal will succeed but cdm will then shortly proceed to kill the process afterward. This problem is completely fixed by using setsid.
Untrap before calling console programs
At least bash refuses to let you untrap signals that have been trapped by a parent process. Not untrapping it here means effectively and unrevokably disabling ^C in any child process of any child bash shell. It's irritating and confusing and probably not intended to happen.
Owner

evertiro commented Oct 18, 2012

Probably not!

evertiro added a commit that referenced this pull request Oct 18, 2012

Merge pull request #11 from esalaka/master
Fixes minor strange errors with X launching and SIGINT

@evertiro evertiro merged commit ced5b02 into evertiro:master Oct 18, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment