Commit 498b723
committed
Set child process as foreground
When stdin is a tty, this sets the child process as foreground process
group so that it handles signals from the terminal. For instance
if running a Python shell or similar, ctrl-c will go as SIGINT to
the child Python process instead of the monitor process, which would
terminate when Python is capable of handling the terminal.
Fixes #369
Signed-off-by: Valentin David <me@valentindavid.com>1 parent 0c408e1 commit 498b723
1 file changed
Lines changed: 31 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2878 | 2878 | | |
2879 | 2879 | | |
2880 | 2880 | | |
| 2881 | + | |
2881 | 2882 | | |
2882 | 2883 | | |
2883 | 2884 | | |
| |||
3102 | 3103 | | |
3103 | 3104 | | |
3104 | 3105 | | |
| 3106 | + | |
| 3107 | + | |
| 3108 | + | |
| 3109 | + | |
| 3110 | + | |
| 3111 | + | |
3105 | 3112 | | |
3106 | 3113 | | |
3107 | 3114 | | |
| |||
3149 | 3156 | | |
3150 | 3157 | | |
3151 | 3158 | | |
| 3159 | + | |
| 3160 | + | |
| 3161 | + | |
| 3162 | + | |
| 3163 | + | |
| 3164 | + | |
| 3165 | + | |
| 3166 | + | |
| 3167 | + | |
| 3168 | + | |
| 3169 | + | |
| 3170 | + | |
| 3171 | + | |
| 3172 | + | |
| 3173 | + | |
3152 | 3174 | | |
3153 | 3175 | | |
3154 | 3176 | | |
| |||
3219 | 3241 | | |
3220 | 3242 | | |
3221 | 3243 | | |
| 3244 | + | |
| 3245 | + | |
| 3246 | + | |
| 3247 | + | |
| 3248 | + | |
| 3249 | + | |
| 3250 | + | |
| 3251 | + | |
| 3252 | + | |
3222 | 3253 | | |
3223 | 3254 | | |
3224 | 3255 | | |
| |||
0 commit comments