Socket/Terminal Control Question

Socket/Terminal Control Question

Post by sasurgu.. » Wed, 13 Jan 1993 01:49:25

I ain't really sure where to POST this so PUT THOSE FLAME THROWERS DOWN

Thank You...

If you have a situation where you would like for A to call B and then let
B take control of that session via a Terminal.  How would you actually
implement this, and of course the $64,000 question is : is there something
out there in NETLAND that we could snarf which would allow us to accomplish
this task:

My limited UNIX programming skills tells me this could be accomplished via
sockets:  That is B is continuously listening for a connection from a
certain party and when he gets that connection he binds it. And although
I haven't acutally worked with TLI I would assume that the same thing
could be accomplished using this TLI Transport in the SVR3+ environment.

If you were SVR2 would you be SOL?

Thanks For Insight into this:

Scott A. Surguine
Wan Coordinator
Antarctic Support Associates


1. controlling terminal question

I see this behavior only in solaris
/home/ffdfptz/t >stty &
[1]     16501
/home/ffdfptz/t >
/home/ffdfptz/t >
[1] + Stopped (SIGTTOU)        stty &
/home/ffdfptz/t >fg
ispeed 88840 baud; ospeed 88824 baud; -parity cstopb hupcl loblk
rows = 43; columns = 122; ypixels = 698; xpixels = 986;
quit = <undef>; erase = ^h; swtch = <undef>;
-inpck -istrip icrnl ixoff onlcr
echo echoe echok echoctl echoke
/home/ffdfptz/t >

whenever I run stty in the background I get this. On doing truss...

mmap(0x00000000, 8192, PROT_READ|PROT_EXEC, MAP_PRIVATE, 4, 0) =
mmap(0x00000000, 16384, PROT_READ|PROT_EXEC, MAP_PRIVATE, 4, 0) =
close(4)                                        = 0
close(3)                                        = 0
munmap(0xEF790000, 8192)                        = 0
    Stopped by signal #27, SIGTTOU, in ioctl()
ioctl(0, STGET, 0x0002643C)                     Err#22 EINVAL
ioctl(0, TCGETS, 0x00026460)                    = 0
        iflag=0016400 oflag=0000005 cflag=037777773375 lflag=0005073
            cc:  003 000 010 025 004 000 000 000
                 021 023 032 031 022 017 027 026 000 000 000
ioctl(0, TCGETX, 0x0002642C)                    Err#22 EINVAL
ioctl(0, TIOCGWINSZ, 0x00026424)                = 0

The map and unmap in the beginning is the dependency shared objects
metting memory mapped and need not be concerned.
Looks like an STGET ( an undocumented "get line options" ) ended up in
receiving SIGTTOU.

As per the man page for termio, a backgroung process can get a SIGTTOU
if it tries to modify the terminal setting.

I m a really confused. If any of you can shed some light....

Sent via
Before you buy.

2. video setup problem...

3. A question about terminal i/o control.

4. Thinkpads & Linux

5. Controlling Terminal question

6. How do I get x windows to run?

7. Question: Problem with socket, socket system call returns 0

8. Problem with Solaris 2.1 X86 and Seagate ST-11200N disk

9. socket timeout? (socket programming question)

10. socket question - which process opened a socket?

11. transferring control of terminal to child

12. Finding controlling terminal

13. Starting a process without a controlling terminal