Re: Spawn a process without exec



John Cupitt wrote:

At the moment I know almost nothing about glib threads, but after
taking a first look at the API reference I couldn't find any way to
"kill" a thread from the main thread, which is what I want to do.
Apparently thread cancel is very hard to implement portably.


I think that more than "hard to implement portably", it's just not a good idea... it's as good as a GUI application that says "To exit open a shell and kill this program (the Close button doesn't work)". If you kill a thread, how do you know what was it doing? Was it malloc()ing something? Was it writing to a file? Was it playing with some global variables? Was it holding a mutex? I'm not an expert in multi-threaded programming, but I think if a program really wants to use something like this, it's broken.


Daniel K. O.




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]