[lkml]   [2001]   [Sep]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Subjectstdin/pipe problem with kernel 2.4.9

I repost this because you may have been distracted by the date contained
in the old subject line. So far there was no response at all. No hint,
no trick, no RTFM (pointers?) or whatever. So far I wasn't able to find
anything related using google, the kernel docs and the linux-kernel archive.
The SuSE support won't help me with 2.4 and the support database doesn't contain
any (findable) article related to my problem. So I decided to repost my question.

-------- Original Message --------
Subject: stdin problem kernel 2.4.9 (was: Re: Your post from 2000/07/15)
Date: Fri, 14 Sep 2001 13:14:58 +0200
From: Dirk Försterling <>
CC: Henrik Størner <>
References: <> <>

Henrik Størner wrote:

> Hi Dick,

It's Dirk (funny, I know, because of the similarity with that knife-like tool..)


Desperately crawling the web for people having similar problems iI stumbled into
an article in linux-kernel. I contacted its author in hope of getting some hint
on what's going on on my system. He told me that the problem discussed in that
article was solved before the 2.4.0 release.

> #From: Linus Torvalds <>
> #Date: Fri, 8 Sep 2000 13:41:46 -0700 (PDT)
> #Subject: Linux-2.4.0-test8
> #
> #Ok, as the truncate problems really seem to be fixed, it's time to do an
> #official test8, the first development kernel in about a year and a half
> #that should have a working truncate() again.
> I don't have the problem with the current (2.4.9) kernels. So
> I would suggest that you try the

So I do. If anyone has a hint for me, please cc: the answer to me, thanks.

> mailinglist to see if someone else has any idea what is happening
> on your system.
> If you have a way of reproducing the problem, that would of
> course make things a lot easier!

Well, I really don't know if it has something to do with kernel 2.4, but
I suspect the kernel 2.4 because I don't have the problem with 2.2.x

After investigating my examples any further I can say that the problem
I encountered doesn't affect pipes in general but only stdin which cannot be
read by some processes.

Here are my examples:

1) bash-scripts run through cron.

I used to start some scripts through cron running a remote command using ssh
like this (kernel 2.2.x):

0 8 * * * /usr/local/bin/ >> /var/log/gettime.log
/bin/date -s "`/usr/local/bin/ssh server01 -l timeuser date '+%x\ %X`"

After upgrading to Linux 2.4.x the script failed badly. On server01 it appeared that
there was no ssh connection made. However, I found a workaround by changing the script. Note the input redirection from /dev/null.

/bin/date -s "`/usr/local/bin/ssh server01 -l timeuser date '+%x\ %X` < /dev/null"

2) Modem connection using mgetty. Intermixes modem commands and console i/o.
A user logs into a shell account on the system using a modem. Everything works fine
with 2.2.x. Switching to kernel 2.4.x, the user gets its output garbled with modem
control chars. Sometimes there are modem command strings appearing on the remote terminal.
I have no solution or workaround for this one so far.

3) "smbprint" invoked by lpd.
The script is configured as an input-filter and gets its input from stdin and hands it over
to smbclient's stdin via pipe. With 2.2.x everything works fine. Using 2.4.x the filter script
doesn't return. I found out that the "bad" guy seems to be smbclient here. I changed the script
not to use a pipe but a temporary file, which now works.

4) A java process (started by a shell script also run by cron like in the first example) fails
to connect the stdin/stdout/stderr of a spawned shell-subproces to redirect properly. Calling
stream.available() on the external input stream causes the following exception: Inappropriate ioctl for device. No solution here also. The < /dev/null
doesn't seem to work here.

About the system(s): All of the systems involved are PCs running SuSE linux 7.2. In addition to
the SuSE-built kernel I tried vanilla 2.4.7 and 2.4.9 on these systems. No matter which kernel I
used, the problems always occur. The 2.2 kernels I used include 2.2.16 and 2.2.19 (both
SuSE-built and straight from

I'm curious if this really is a kernel issue. Maybe this is onyly a misconfiguration of the
kernel. I'm not sure. Maybe this is a SuSE specific problem, but I seem to be the only SuSE
7.2 user having this particular problem.


:: Dirk Försterling :: Support & Entwicklung
:: eORGA Bernhard Üllenberg
:: Klosterstr. 49 :: c/o GmbH :: 40211 Düsseldorf
:: Fon +49.211.3985823 :: Fax +49.211.3985824

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2005-03-22 13:03    [W:0.076 / U:0.824 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site