Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.unix.programmer > #13668
| From | scott@slp53.sl.home (Scott Lurndal) |
|---|---|
| Subject | Re: a kind of a web-shell-api for managing long running processes |
| Newsgroups | comp.unix.programmer |
| References | <86ee5tq25z.fsf@levado.to> <%UpzJ.193373$qz4.93168@fx97.iad> <86v8z5nie9.fsf@levado.to> |
| Message-ID | <9kFzJ.991$jW.810@fx05.iad> (permalink) |
| Organization | UsenetServer - www.usenetserver.com |
| Date | 2021-12-31 15:28 +0000 |
Meredith Montgomery <mmontgomery@levado.to> writes: >scott@slp53.sl.home (Scott Lurndal) writes: > >>>One concern I have is the following. Is it possible for a process to >>>simply ``get out of'' the shell? What do I mean by that? A process >>>that does fork() and puts itself into background would leave the >>>web-api-shell's control, wouldn't it? >> >> Define 'get out of' in this context. > >Say the shell runs a process P and suppose P forks() --- creating Q --- >then P exits, leaving Q orphaned. I believe Q's parent is now process >1. I wonder if this creates difficulties to my objectives. Process Q is still part of the shell "session" until it explicitly starts a new session (setsid). Consider the case where process Q is another shell. What you probably want is to run your application in a container. https://en.wikipedia.org/wiki/LXC For the case you enumerated (background tasks) you may want to consider a cooperative tasking setup where multiple independent processes communicate (e.g. the web system communicates through some form of inter process communication (pipes, unix domain sockets, network sockets, FIFO's or posix message queues) with a mailer or other process rather than forking and exec'ing each time you need to perform the task).
Back to comp.unix.programmer | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
a kind of a web-shell-api for managing long running processes Meredith Montgomery <mmontgomery@levado.to> - 2021-12-30 17:16 -0300
Re: a kind of a web-shell-api for managing long running processes scott@slp53.sl.home (Scott Lurndal) - 2021-12-30 21:55 +0000
Re: a kind of a web-shell-api for managing long running processes Meredith Montgomery <mmontgomery@levado.to> - 2021-12-31 08:06 -0300
Re: a kind of a web-shell-api for managing long running processes scott@slp53.sl.home (Scott Lurndal) - 2021-12-31 15:28 +0000
Re: a kind of a web-shell-api for managing long running processes Jorgen Grahn <grahn+nntp@snipabacken.se> - 2022-01-01 00:46 +0000
Re: a kind of a web-shell-api for managing long running processes Jorgen Grahn <grahn+nntp@snipabacken.se> - 2022-01-01 01:03 +0000
csiph-web