Thread View: comp.unix.programmer
3 messages
3 total messages
Started by Jay Maynard
Mon, 26 Nov 1990 06:29
Exiting a program logs me out!
Author: Jay Maynard
Date: Mon, 26 Nov 1990 06:29
Date: Mon, 26 Nov 1990 06:29
20 lines
1489 bytes
1489 bytes
I'm trying to get the dte editor, which was recently posted to
comp.binaries.ibm.pc, to work on my System V. The author, Douglas Thomson,
included complete source, as well as an I/O module for HP-UX. Unfortunately,
it used the TIOCGETA and TIOCSETA functions and the sgttyb structure, which
aren't supported under vanilla System V. I figured out how to convert them to
termio calls, and got everything to compile.
When I run the program, though, it runs fine until I exit. It then gives me a
shell prompt - and then logs me off.
I'm sure this is something dumb that I'm doing, but I can't for the life of me
figure out what. Anyone out there run into this kind of problem before? If
you have, please drop me a note; I'll summarize if there's interest.
Thanks!
--
Jay Maynard, EMT-P, K5ZC, PP-ASEL | Never ascribe to malice that which can
jmaynard@thesis1.hsch.utexas.edu | adequately be explained by stupidity.
"With design like this, who needs bugs?" - Boyd Roberts
Re: Exiting a program logs me out!
Author: Paul Chamberlain
Date: Mon, 26 Nov 1990 15:30
Date: Mon, 26 Nov 1990 15:30
11 lines
1069 bytes
1069 bytes
In article <4366@lib.tmc.edu> jmaynard@thesis1.hsch.utexas.edu (Jay Maynard) writes: >When I run the program, though, it runs fine until I exit. It then gives me a >shell prompt - and then logs me off. This is what happens when a program exits and leaves your "stty" hosed. If you turn off icanon and have vmin/vtim set in a particular way, the shell's read will timeout with 0 chars read -- the standard indication of EOF. Paul Chamberlain | I do NOT represent IBM. tif@doorstop, sc30661 at ausvm6 512/838-7008 | ...!cs.utexas.edu!ibmchs!auschs!doorstop.austin.ibm.com!tif
Re: Exiting a program logs me out!
Author: the main man
Date: Wed, 28 Nov 1990 15:53
Date: Wed, 28 Nov 1990 15:53
35 lines
2228 bytes
2228 bytes
In article <4366@lib.tmc.edu>, jmaynard@thesis1.hsch.utexas.edu (Jay Maynard) writes: > > I'm trying to get the dte editor, which was recently posted to > comp.binaries.ibm.pc, to work on my System V. The author, Douglas Thomson, > included complete source, as well as an I/O module for HP-UX. Unfortunately, > it used the TIOCGETA and TIOCSETA functions and the sgttyb structure, which > aren't supported under vanilla System V. I figured out how to convert them to > termio calls, and got everything to compile. > > When I run the program, though, it runs fine until I exit. It then gives me a > shell prompt - and then logs me off. > I don't know the editor you talk about but if it uses CURSES then the problem may be inherent in libcurses.a. In some versions of CURSES (specifically in early System V), if nodelay() is set somewhere in your program and not reset before the program exits, an EOF is sent to the parent process that spawned the program. If the parent process is the login shell then the user is logged off the system. The trick is to place a line of code: nodelay(stdscr,FALSE); just before calling endwin() in the exiting stages of your program. Of course all this assumes the program uses CURSES. .===========================================================================. | ACSnet: berny@tndsyd.oz UUCP: uunet!munnari.oz!tndsyd.oz.au!berny | | INTERNET: berny@tndsyd.oz.au DOMAIN: goodheart_berny@tandem.com | | PSMAIL: smtpgate @comm(berny@tndsyd.oz@munnari.oz.au) | | FIDONET: berny@f614.n713.z3.fidonet.org@tndsyd.oz.au (3:713/614.0) | `===========================================================================' TANDEM Computers Incorporated 76 Berry St, North Sydney, NSW, 2060, Australia
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads