vBulletin Search Engine Optimization
| |||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| On 05/05/08 16:00 +0200, Hannah Schroeter wrote: > After reading the kernel sources about this, I think the definition in > <sys/ttycom.h> is probably in error and it should be > #define TIOCSIG _IOW('t', 95, int) > ^^^^ ^^^ > > Strangely, the xterm sources don't reference TIOCSIG, so I don't know > how xterm implements the send SIGfoo menu functions instead. > > >But I cannot find any clues about it in pty(4). > > >The code: > > int sig = SIGTERM; > > ioctl(pty_master, TIOCSIG, &sig) ; > > That usage should be ok, and perhaps would work if you patched > <sys/ttycom.h> appropriately (recompile kernel, reboot, recompile your > app). > Thank you, guys. After applying the patch, the int sig = SIGTERM; ioctl(pty_master, TIOCSIG, &sig) ; works without error, but the signal sent by TIOCSIG has no effect unless the read(2) operation occurs on the pty_master. That is, if I want to use TIOCSIG to send the signal, I must read(2) from pty_master first, then ioctl the signal with TIOCSIG request, right? As the TIOCSIG has no documentations, I'm not sure whether it's a bug or feature... -- Dasn |
| Thread Tools | |
| Display Modes | |
| |