opening a new terminal and output it there

S

sayansayan

two threads are running in a prog i need the output of one thread in a
new terminal which the prog will create and the output of other thread
in the old terminal
 
S

santosh

two threads are running in a prog i need the output of one thread in a
new terminal which the prog will create and the output of other thread
in the old terminal

Standard C has no support for threads, nor for terminals. You need to
use platform specific API to do what you want. Look up the
documentation for your compiler and OS and search for a suitable group
like say comp.os.ms-windows.programmer.win32 or comp.os.linux etc.
 
J

jacob navia

two threads are running in a prog i need the output of one thread in a
new terminal which the prog will create and the output of other thread
in the old terminal

Fine. Go ahead and write that program! You are just trying to cheat
and make somebody else do the work for you.
 
S

sayansayan

Fine. Go ahead and write that program! You are just trying to cheat
and make somebody else do the work for you.


when i open a dtterm i find the output in old terminal but not in new
terminal hoe to rediedt the ouput in the new terminal
 
T

Thomas Dickey

santosh said:
like say comp.os.ms-windows.programmer.win32 or comp.os.linux etc.

neither of this would have dtterm (see second message from OP)

noting that the usual redirection to the above-cited newsgroups in
this group is usually done to be insulting...

regards
 
R

Richard Tobin

when i open a dtterm i find the output in old terminal but not in new
terminal hoe to rediedt the ouput in the new terminal

I doubt there's an easy way to direct different threads' standard
output to different terminals. You'll probably have to open a new
stream and write the output to that. The problem then is finding out
the name of the file to open corresponding to the new terminal.

I'm not familiar with dtterm, but if it's a unix program and is like
other terminal programs I've used it may be possible to open a "pseudo
terminal" device, pass the name of that device to dtterm as an
argument, and send output to the terminal by writing to that device.
You need to read the manual.

-- Richard
 
W

Walter Roberson

neither of this would have dtterm (see second message from OP)

I find references to dtterm for Linux . Might not be its primary
platform, but seems to exist.
 
T

Thomas Dickey

I find references to dtterm for Linux . Might not be its primary
platform, but seems to exist.

it's very rare (only google can find the information ;-).
 
K

Keith Thompson

Thomas Dickey said:
neither of this would have dtterm (see second message from OP)

Ok, so he's probably not using Windows or Linux, but those were both
reasonable guesses given the information available (except that
comp.os.linux is a hierarchy, not a single newsgroup). Note that
santosh didn't specifically say that the OP should go to one of those
groups; the OP should be able to figure out which newsgroup is
appropriate for his system. comp.unix.solaris is a possibility, but
that also is only a guess.
noting that the usual redirection to the above-cited newsgroups in
this group is usually done to be insulting...

Nonsense. We try to redirect posters to newsgroups where they'll be
able to get good answers to their questions. There is nothing even
vaguely insulting in santosh's reply.

What reply would have met your standards for politeness?
 
T

Thomas Dickey

Ok, so he's probably not using Windows or Linux, but those were both
reasonable guesses given the information available (except that

OP didn't cross-post, so that information was not given by _him_.
One of the snooty replies pointed him in that direction.

If I didn't know what dtterm was, I'd at least look to see before
offering poor advice regarding it (let's hope that no one ever
asks you for traffic directions).
Nonsense. We try to redirect posters to newsgroups where they'll be
able to get good answers to their questions. There is nothing even
vaguely insulting in santosh's reply.

;-)
 
M

Mark McIntyre

I'm not familiar with dtterm, but if it's a unix program

port of decterm to unix I think ? Supports some legacy h/w emulation
anyway. Archaic.

--
Mark McIntyre

"Debugging is twice as hard as writing the code in the first place.
Therefore, if you write the code as cleverly as possible, you are,
by definition, not smart enough to debug it."
--Brian Kernighan
 
T

Thomas Dickey

Mark McIntyre said:
On 29 Jun 2007 15:53:57 GMT, in comp.lang.c , (e-mail address removed)
(Richard Tobin) wrote:
port of decterm to unix I think ? Supports some legacy h/w emulation
anyway. Archaic.

no: dxterm iirc is a port of decterm, but that's a different program.

regarding "Archaic" - the FAQ for this newsgroup is full of that,
so there's no point in pursuing _that_.
 
K

Keith Thompson

Thomas Dickey said:
OP didn't cross-post, so that information was not given by _him_.
One of the snooty replies pointed him in that direction.

If I didn't know what dtterm was, I'd at least look to see before
offering poor advice regarding it (let's hope that no one ever
asks you for traffic directions).

santosh may or may not have known what dtterm is, but he was replying
to an article that *didn't mention dtterm*. The original article only
mentioned "terminals". The OP mentioned dtterm in another followup,
one that santosh likely hadn't even seen.

I fail to see the humor.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,048
Latest member
verona

Latest Threads

Top