• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

[C] Output to Separate Terminal

40sTheme

Golden Member
Hi,
I'm writing a program in C on Linux and I need child processes (forked) to send their output to a separate terminal window. I have googled numerous times and cannot figure it out...
I've tried opening /dev/pts/1 as a file stream and

fprintf(Child_Terminal, "text");

But this does not work, and I cannot think of another way to do it.
Thanks!
 
I'm not sure exactly, but using an 'execvp' (or execve) command and passing it "xterm" will open up a new X11 terminal window. I'm not entirely sure how to get a file descriptor over that particular window though.

-Kevin
 
Hmm.. still can't figure it out. I can't get the other terminal windows output as a file stream so I don't know how to put stdout to it.
 
Back
Top