Michael S <alre…@yahoo.com> writes:
>On Thu, 29 Oct 2026 16:20:39 -0000 (UTC) >bolt…@caprica.universe wrote: >
>> On Wed, 28 Oct 2026 14:09:32 -0700 >> "Chris M. Thomasson" <chri…@gmail.com> gabbled:
>> >On 10/28/2026 2:06 AM, bolt…@caprica.universe wrote:
>> >> On Mon, 26 Oct 2026 22:04:33 +0200 >> >> Michael S <alre…@yahoo.com> gabbled:
>> >>> On Mon, 26 Oct 2026 09:51:51 -0000 (UTC) >> >>> bolt…@caprica.universe wrote:
>> >>>> Go ahead and remain clueless. >> >>>>
>> >>> >> >>> >> >>> system() can do most of the same things as spawn() family.
>> >> >> >> Rubbish, you clearly didn't bother to spend 2 mins googling. >> >>
>> >>> The problem with system() is not that. Often not even an >> >>> efficiency. The problem with system() identified most easily if >> >>> we ask ourself "Why do we want xyz in standard library?"
>> >> >> >> The problem with system is its fire and forget - all you can do >> >> with it is collect its exit code when its done. You can't >> >> communicate with it via pipes, you can't control it via signals >> >> (well, not easily), you can't set its
>> >
>> >> process group, tty and on and on. Oh, and it also fires up the >> >> default shell
>> >to
>> >> do the actual execution making it hideously inefficient. No >> >> serious unix dev uses system() unless thay have absolutely no >> >> choice or it really is a case of
>> >
>> >> "go run this, I don't care what happens". >> >> >> >>
>> > >> >Right. std::system, at least when I use it, makes the caller block >> >until the process is done.
>> >> Thats true. Its been so long since I used it I'd forgotten about >> that. Makes it even less useful. >>
> >Does it block when your command processor is bash and your command >string is "my_subprocess &"?
You might need to do 'nohup my_subprocess &' if my_subprocess doesn't intercept SIGHUP.