RE: Change sigTTOU/TTIN to IGNORE by default

2001-01-16 Thread Simon Marlow
You're right. ``tcsetattr'' doesn't affect the ``TOSTOP'' flag, but it sends a SIGTTOU, when invoked from a background process. This, in turn, causes the process to suspend unless SIGTTOU is blocked or ignored! SUSv2 says, this is the correct behaviour:

Re: Change sigTTOU/TTIN to IGNORE by default

2001-01-16 Thread Volker Stolz
In local.glasgow-haskell-bugs, you wrote: I guess it's another one of those dark corners that Volker seems to wonder into with alarming regularity :) Hey, you guys want real-world haskell applications, so you get them :) Which reminds me of a yet untackled sigCHLD problem which shows up only on

Re: Change sigTTOU/TTIN to IGNORE by default

2001-01-16 Thread Michael Weber
* Simon Marlow [EMAIL PROTECTED] [2001-01-16T02:17-0800]: [...] The Solaris man page has this exact same paragraph, although I can find no mention of this behaviour in the POSIX book I have, the Linux man pages (surprise :-) or the Glibc docs. Well, yes the man pages *ummh* sort of suck, but

RE: Change sigTTOU/TTIN to IGNORE by default

2001-01-15 Thread Simon Marlow
In fact I can produce a simple example, either. So just the facts: perftest@monster [11:46:35] ./Reader [2] 86029 perftest@monster [11:46:40] jobs [2]+ Stopped ./Reader Sourcecode-snippet of Reader: main = do -- Posix.installHandler Posix.sigTTOU Posix.Ignore

RE: Change sigTTOU/TTIN to IGNORE by default

2001-01-15 Thread Malcolm Wallace
But we're not changing any of the terminal flags, simply setting the same ones again. I'm totally stumped! Any ideas, anyone? According to the manual page, tcgetattr() ... This function may be invoked from a background process; however, the terminal

Re: Change sigTTOU/TTIN to IGNORE by default

2001-01-15 Thread Michael Weber
* Michael Weber [EMAIL PROTECTED] [2001-01-16T00:00+0100]: [...] So, a solution seems to be, to block SIGTTOU during the call of tcsetattr [...] BTW: Eventually, the following functions need the same shielding: tcsetattr, tcsendbreak, tcflow, tcflush Cheers, M/ -- () ASCII ribbon

RE: Change sigTTOU/TTIN to IGNORE by default

2001-01-15 Thread Simon Marlow
So it seems that there is possibly a feature/bug in the C library such that calling tcsetattr() always suspends a backgrounded process, regardless of the setting of TOSTOP. As yet, I haven't been able to find a workaround. :-( Yes, I went through a similar set of diagnoses myself after I

RE: Change sigTTOU/TTIN to IGNORE by default

2001-01-11 Thread Simon Marlow
My local copy of ghc-4.08.1 likes to stop a program when running it with "" (nohup) by default, I have to call Posix.installHandler Posix.sigTTOU Posix.Ignore Nothing first to get the desired behaviour. However, my local copy of StevensĀ“ "UNIX Network Programming" says: "SIGTTOU: [..]

Re: Change sigTTOU/TTIN to IGNORE by default

2001-01-11 Thread Volker Stolz
Am 11. Jan 2001 um 11:54 MET schrieb Volker Stolz: In fact I can produce a simple example, either. So just the facts: * Thats a "cant" of course. *sigh* -- \usepackage[latin1]{inputenc}! Volker Stolz * [EMAIL PROTECTED] * PGP + S/MIME

Change sigTTOU/TTIN to IGNORE by default

2001-01-10 Thread Volker Stolz
My local copy of ghc-4.08.1 likes to stop a program when running it with "" (nohup) by default, I have to call Posix.installHandler Posix.sigTTOU Posix.Ignore Nothing first to get the desired behaviour. However, my local copy of Stevens "UNIX Network Programming" says: "SIGTTOU: [..] By