Which is exactly what he said. Re-read the above paragraph: "... you
can't do that with threads, you 'll have to spin off a separate
process, with fork or somesuch."
Nonetheless, the answer is still very likely wrong. It's possible
that the OP can't successfully call system() in a thread other
than the process main thread in his implementation, but how AH
came to that conclusion is unclear and suspect, since we know
nothing about the OP's implementation other than that it provides
the system function (and so is probably hosted), provides threads of
some sort, and has some abnormal exit condition that the OP refers
to as "a Segmentation Fault". (That might be a POSIX SIGSEGV, but
it might well be something else; and POSIX alone doesn't tell us
very much. OS/400 V4R3 was POSIX-compliant and UNIX-branded, IIRC.)
Oh, and that there's something called "a gtk callback" in the OP's
environment; that might be a callback function for the GNU GTK+
toolkit, say, but it might be something else entirely.
[OT] As it happens, I have just used one C implementation, plus
facilities available in the environment for that implementation,[1]
to successfully invoke the system library function in a thread other
than the program's main thread. I did not do this as any sort of
"gtk callback", but unless AH's claim was founded specifically on
this requirement, it would appear that he is, indeed, talking
rubbish.
[Further OT] The answer is suspect anyway, since AH mentions Unix,
and in Unix system is required to create a new process "as if by
fork". See SUSv3 / IEEE 1003.1-2004. Thus his answer, as written,
is nonsensical; the OP is already creating a process, if he is
using a Unix implementation.
To the OP: threads, segmentation faults, and gtk are not part of
the standard C language. You might get more helpful answers - such
as more specific redirects - if you include information about your
environment when you ask questions.
Yes, both threads and processes are off-topic here. They're topical
in comp.programming.threads and comp.unix.programmer, respectively.
*Unix* processes are topical in comp.unix.programmer. We don't know
that the OP's processes are.
[1] gcc -ansi -pedantic -Wall, version 2.96, on Red Hat Linux 7.1
(Linux 2.4.7-10 #1 i686), plus pthreads from glibc-devel-2.2.4-13;
because I happened to have it handy.