Linux-Misc Digest #252, Volume #25               Thu, 27 Jul 00 15:13:02 EDT

Contents:
  Re: sys notification and CRON (William R. Mattil)
  Re: Token Ring Network card on Linux ([EMAIL PROTECTED])
  Can'r read DOS floppy on one machine ("micromans")
  Re: Redhat 6.2 and fork problem. Urgent Help needed!!!!!!!!!!!! (Vahe Sarkissian)
  Re: Printer driver ("Larry K. Brown")
  Re: xterm line misplaced on monitor screen (Steve)
  Re: File permissions ([EMAIL PROTECTED])
  Re: ps2 mouse problem with portege 7020 running win98 ("The Magicman")
  Re: Linux takes up >5GB! (tolan)
  Re: Are there substantially more/less RPMs for RH or SuSE? (Rasputin)
  Re: Large HD + Linux + Win98 ("Gary")
  Re: Linux takes up >5GB! (Leonard Evens)
  Re: Scrwed up glibc ... how to fix ? (Brian Moore)
  Re: ftp automated batch copy (Jay Hall)
  Re: sys notification and CRON (-ljl-)
  Install without floppy or CD? (Andrew J. Perrin)
  Re: "dd" copy fails to copy errors (Dances With Crows)
  Re: newbie: apache problem (Akira Yamanita)
  highlight stderr, leave stdout alone (Mike Schiraldi)

----------------------------------------------------------------------------

From: [EMAIL PROTECTED] (William R. Mattil)
Subject: Re: sys notification and CRON
Date: Thu, 27 Jul 2000 11:19:42 -0500
Reply-To: [EMAIL PROTECTED]

In article <[EMAIL PROTECTED]>,
jtoy  <[EMAIL PROTECTED]> wrote:
>When stuff gets done on my system such as job notification from CRON
>that the job was completed, I get an email to root.  I have cron jobs
>that run every hour, so after a day I get around 50 emails that I delete
>by hand.  How can I surpress certian system emails such as CRON job
>emails?  Thanks

You need to specifiy what you want done with stdout and stderr. As an example

50 23 * * * /home/wrm/bin/make-gif hd6 >/dev/null 2>&1

redirects stdout to /dev/null and the 2>&1 says to lump stderr into stdout.
This is probably a bad idea until the scripts have been really debugged
and even then stderr could be valuable if something ever breaks.

Someone may have other solutions that *may* work but will be Linux
specific. This works on any Unix I've ever used so it is quite portable.


Regards

Bill
-- 
William R. Mattil       | Fred Astaire wasn't so great.
[EMAIL PROTECTED]  | Ginger had to do it all backwards
(972) 399-4106          | and... in high heels.

------------------------------

From: [EMAIL PROTECTED]
Crossposted-To: comp.os.linux.hardware,comp.os.linux.networking,comp.os.linux.setup
Subject: Re: Token Ring Network card on Linux
Date: Thu, 27 Jul 2000 16:58:51 GMT

I've used older IBM cards and older 3Com ISA cards.

> Only IBM ISA cards that are NOT LAN_Streamers are supported. A very
few other cards will work because they use the IBM
> chipset. The very latest PCI card from IBM is also supposed to work,
but I have not tried them yet. I have TR running
> on a number of Linux PC's, including my laptop, but they all use IBM
brand, older model cards.
>
> In article <[EMAIL PROTECTED]>, Simon He wrote:
> > From: "Simon He" <[EMAIL PROTECTED]>
> > Newsgroups:
comp.os.linux.hardware,comp.os.linux.misc,comp.os.linux.networking,comp.
os.linux.setup,linux.redhat.misc
> > Subject: Token Ring Network card  on Linux
> > Date: Thu, 27 Jul 2000 09:49:51 +1000
> >
> > Hi,
> >
> > I was trring to setup Red Hat Linux 6.2 on a Token Ring Network,
somehow the
> > token ring card could not be initialized at bootup even after
editing the
> > conf.module file. The error message I'm getting is:
> >
> > localhost insmod: /lib/modules/2.2.14-12/net/ibmtr.o: init_module:
Device or
> > resource busy
> > localhost insmod: /lib/modules/2.2.14-12/net/ibmtr.o: insmod tr0
failed
> > localhost kernel: ibmtr: register_trdev() returned non-zero.
> >
> > I have tried both ISA and PCI card but to no avail, could anyone
provide me
> > with solution to this problem ?
> >
> >
> > Simon
> >
>
> Werner Kliewer
> in Winnipeg
>
>


Sent via Deja.com http://www.deja.com/
Before you buy.

------------------------------

From: "micromans" <[EMAIL PROTECTED]>
Subject: Can'r read DOS floppy on one machine
Date: Thu, 27 Jul 2000 10:12:20 -0700

We have 4 RedHat linux boxes that can read from the same DOS floppy on 3 of
the 4 systems. But on the 4th system it won't read the floppy. The
/etc/fstab has the same entry for the floppy unit on all 4 machines, as
follows:


/dev/fd0   /mnt/floppy      auto    noauto, owner     0,0


Here's what happens. On the machine that we have a problem with we do the
following:

a) Log in as root
b) cd /mnt
c) mount floppy
d) cd /mnt/floppy
e) ls

When we type 'mount' the floppy drive's light goes on while the drive
mounts. But when we do 'ls' we get absolutley nothing except for the '#'
prompt returned to us. Yet on the other three machines it works fine,
listing the two DOS files that are on the floppy.

What's the problem?

Thanks,
Micromans



------------------------------

From: Vahe Sarkissian <[EMAIL PROTECTED]>
Subject: Re: Redhat 6.2 and fork problem. Urgent Help needed!!!!!!!!!!!!
Date: Thu, 27 Jul 2000 17:13:28 GMT

In article <397dcc99$0$[EMAIL PROTECTED]>, [EMAIL PROTECTED] 
says...
> Hi,
>     We have a customer who is using our paging software, which uses the cu
> command to connect to paging terminals. Our Software uses the fork command
> and pipes to call and communicate with cu command, respectively. This
> software runs fine on Redhat 5.x and 6.0 version, but on 6.2 version, it as
> soon as it calls cu, it get SIGCHLD signals as shown below from the logfile.
> 
<snip>
>From where I sit, the problem doesn't appear to be with SIGCHLD or fork.  
The cu program is dying as soon as it is started.  Using the line 
verbatim from your log file, try typing "/usr/bin/cu -e ..." at the shell 
prompt and see what happens.  Follow the thread from there.

Hope this helps.
--Vahe Sarkissian
Remove nospam to email

------------------------------

Date: Thu, 27 Jul 2000 12:17:17 -0500
From: "Larry K. Brown" <[EMAIL PROTECTED]>
Reply-To: [EMAIL PROTECTED]
Subject: Re: Printer driver

Try the software at www.easysw.com.  called ESP Print Pro.  They have a lot
more
specific printer drivers for linux.

Trevor Brown wrote:

> Hi:
>
> I have a Canon BJC-4300 printer.  When I go to configure a printer, the
> closest match I have is BJC-4000... and it tells me that support for more
> than that is only experimental.  Is there a driver for the Canon BJC-4300,
> and if so how do I get it, and how do I set up?  I've never done anything
> quite like it before.
>
> Thanks,
>
> Trevor


------------------------------

From: [EMAIL PROTECTED] (Steve)
Subject: Re: xterm line misplaced on monitor screen
Reply-To: [EMAIL PROTECTED]
Date: 27 Jul 2000 18:23:08 +0100

On 26 Jul 2000 22:46:54 GMT, Susan Cupp wrote:
>
>On a Linux PC running RedHat Linux, at times a line of a xterm window displays
>elsewhere on the monitor screen.  Ctrl-l redraws the window, and xrefresh redraws
>the entire screen.  Video card is ATI|Rage 128 RF and monitor is SGI 20-inch 
>GDM-20E21.
>I've been trying to modify the XF86Config to resolve the problem, but haven't
>been successful to this point.  Any ideas as to what to try?

This question has come up here before, I think it turned out to be
something to do with not seeing the memory on the graphics card.  Have a
look through some old posts and there's a more full explanation there of
how to solve this. 

-- 
Cheers
Steve              email mailto:[EMAIL PROTECTED]

%HAV-A-NICEDAY Error not enough coffee  0 pps. 

web http://www.zeropps.uklinux.net/

or  http://start.at/zero-pps

  5:18pm  up 12 days, 15:44,  2 users,  load average: 1.00, 1.03, 1.03

------------------------------

From: [EMAIL PROTECTED]
Subject: Re: File permissions
Date: Thu, 27 Jul 2000 17:16:27 GMT

In article <8lpjrh$l0f$[EMAIL PROTECTED]>,
  JosB <[EMAIL PROTECTED]> wrote:
> In article <8lpj3k$kf7$[EMAIL PROTECTED]>,
>   [EMAIL PROTECTED] wrote:
> > I know Sun has an extended file permissions system for Solaris and
was
> > wondering if anyone knows of something similar to Linux.  The Sun
> > system (called FCL...I think...it has been 3 years since I've used
> it),
> > let one create permissions more like what one can do on NT.  That
is,
> a
> > file/directory can has different group and user permissions.  This
is
> > above and beyond the standard Unix permissions.
> >
> > thanks.
> >
>
> With Linux you can assing rights for Read, Write and eXecute to
Groups,
> Owner and All users.
>
> Hope this answers your question.
>
> Jos Buurman

That is just the basic Unix file permissions.  What I am looking for
goes beyond that.


Sent via Deja.com http://www.deja.com/
Before you buy.

------------------------------

From: "The Magicman" <[EMAIL PROTECTED]>
Crossposted-To: 
comp.sys.laptops,japan.comp.toshiba,comp.os.linux.portable,comp.os.linux.setup
Subject: Re: ps2 mouse problem with portege 7020 running win98
Date: Thu, 27 Jul 2000 19:29:02 +0200

There are conflicts with some custom mouse drivers like some versions of the
logitech mouseware.
Ever thought about a USB mouse ?

"U. Moon" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]...
> I have a Toshiba laptop Portege 7020 that initially came with Windows NT
> operating system.  Since then I have installed commercial version of
> Windows 98 SE in order to get USB and IR ports working.  But through
> this process, PS2 mouse stopped working.  This is when the BIOS is set
> to "simultaneous" which is suppose to allow both PS2 and "accu-point" on
> my laptop to work at the same time.  Setting the BIOS to "auto detect"
> will make PS2 mouse work, but of course the "accu-point mouse" on my
laptop
> is disabled in that mode.
>
> I have downloaded all that is available on Toshiba website (to my best
> knowledge), and Toshiba tech support was not able to help me.
>
> PS2 and accu-point mouse worked together just fine in NT.  And in my
> dual boot setup, Linux mode also works fine.
>
> Q1:  Anyone have any idea how I can fix this problem?
>
> Q2:  Anyone know if the commercial version of Windows 2000 would fix this?
>
> I would appreciate anyone's help/pointers regarding this.
>
> Regards,
> Un-Ku Moon



------------------------------

From: tolan <[EMAIL PROTECTED]>
Subject: Re: Linux takes up >5GB!
Date: Fri, 28 Jul 2000 02:01:30 +0100

you want to get rid of linux entirely, and reformat the space so dos can
use it?

did you set up dual boot? (ie can you still use the comp at all?)
would you be content with however much space you gave to unix being a
seperate partione (ie E: ) under windows?

if all are yes then you just go into fdisk, chsange the filesystem on
the linux partion to dos (fat) from ext2 and then type format e: (or
whatever)
all from dos window.  all very dangerous so well worth a back up.

------------------------------

From: [EMAIL PROTECTED] (Rasputin)
Subject: Re: Are there substantially more/less RPMs for RH or SuSE?
Reply-To: [EMAIL PROTECTED]
Date: Thu, 27 Jul 2000 17:45:15 GMT

[EMAIL PROTECTED] <Prasanth A. Kumar> wrote:

>Are 'ports' only available as source packages? Building from source
>packages is all well and fine by have you ever tried compiling KDE
>from source? It takes a couple hours to crunch through that assuming
>you have all the pieces needed to build it and some of us don't have
>that time...

Ports by definition are source code.
Packages are the equivalent of RPMs,

 From my experience, building any GUI from source is an investment; yes
it takes longer than RPM, but you'll save time in the long run as it
generally runs faster than a 'one size fits all' binary RPM.

Something huge like gimp or enlightenment generally gets a

./configure;make 

before I go to bed; if the screen isn't full of errors when I wake up,

make install-strip

only takes a minute of my time.

>-- 
>Prasanth Kumar
>[EMAIL PROTECTED]


-- 

Rasputin.
Jack of All Trades - Master of Nuns.

------------------------------

From: "Gary" <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.hardware,comp.os.linux.setup
Subject: Re: Large HD + Linux + Win98
Date: Thu, 27 Jul 2000 18:52:15 +0100

I would recommend using text based yast1.You can create and format all your
partitions from that quite easily. I wouldn't waste time with dos fdisk.
Gary

"Rasputin" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]...
> [EMAIL PROTECTED] <Jan Fischer> wrote:
> >Hello!
> >
> >I have got the following problem:
> >I want to install both Linux (SuSE6.4) and Windows 98 on a new system
> >with a 20.5 GB Western-Digital IDE HD. I have already spent some time
> >trying, but nothing seems to work.
> >
> >Obviously Windows and Linux cannot agree on the partitioning of the
> >harddisk. I have tried both LBA and NORMAL as BIOS modes for the disk.
> >Every time the result was that one of the OSes only recognized 500MB or
> >8GB of the disk, or the partitions overlapped.
> >
> >Thus my questions are:
> >- which mode is the right one (LBA, NORMAL or LARGE)
> >- which software should be used for the partitioning (DOS fdisk,
> >Linux fdisk, cfdisk, yast or WD Data Lifeguard)
> >- are there special parameters for the kernel or for fdisk that have to
> >be specified
> >
> >So far I think I have found out that Windows only works with LBA, Linux
> >only with NORMAL.
>
> Funnily enough I had exactly the same problem last night.
> The symptoms look like there's something wrong with the boot sector;
> everything copies onto the drive OK, but DOS won't boot off it.
> It was actually fine until I noticed that the primary DOS partition
> started about 1.2Gb into the disk and moved it with
> Partition Magic (fool).
>
> My fix was going to be to use cfdisk to create a 1.5Gb DOS partition at
the
> front of the drive, carry on installing Slackware and use lilo to recreate
a
> usable boot sector. And remember *never* to run "lilo -u".
>
> So if LBA is a problem (and I doubt it is), it affects DOS too....
> If I find anything useful, I'll let you know.
> --
>
> Rasputin.
> Jack of All Trades - Master of Nuns.



------------------------------

From: Leonard Evens <[EMAIL PROTECTED]>
Subject: Re: Linux takes up >5GB!
Date: Thu, 27 Jul 2000 12:41:24 -0500

[EMAIL PROTECTED] wrote:
> 
> I recently installed Corel Linux and wish I never had. Somehow after I
> installed it over 5GB of my free space was gone. Plus I cant run Linux at
> all. All I want is to get rid of it and the wasted space. Please help.
> 
> --
> Posted via CNET Help.com
> http://www.help.com/

You clearly did something wrong.   I've installed Linux on
machines with considerably less than 5 GB.   I don't think that
even if you install absolutely everything you can you can get
much over 2 GB.   And that would include all sorts of applications
which would not be part of Windows for example.  

Doesn't Corel come with instructions?   I would suggest at
least trying to reinstall and see if you can do a better job
of it.   During the installation process, you should be able
to repartition the disk to your needs.   Also, if you want
to remove it, you should be able to use the installer to
delete the existing Linux partitions.   Finally, to remove
the lilo boot loader from the master boot record, if it was
put there, boot from a Windows startup disk and then run
the command
fdisk/mbr
That will make it possible for you to reboot windows.

-- 

Leonard Evens      [EMAIL PROTECTED]      847-491-5537
Dept. of Mathematics, Northwestern Univ., Evanston, IL 60208

------------------------------

From: [EMAIL PROTECTED] (Brian Moore)
Subject: Re: Scrwed up glibc ... how to fix ?
Date: 27 Jul 2000 14:00:44 -0400
Reply-To: [EMAIL PROTECTED]

>On Thu, 27 Jul 2000 12:48:28 GMT, [EMAIL PROTECTED] (Davide Bianchi)
>wrote:
>
>>Well, don't ask me why... but I'v managed to screw-up the
>>libc of my installation... now pratically the system is
>>unusable, since ALL the command and function rely on this
>>library to operate.
>>
>>I tryed to "upgrade" the system reinstalling the library,
>>but seems not working...
>>
>>Any idea to solve the problem (without reformatting) ?
>>
>>Davide
>


I did this once and the upgrad install saved me.  Did you try to 
just reinstall the library or the whole thing?   What I did
was booted from the RedHat install CD and installed the whole thing
as an upgrade.  I lost a few config. files because it overwrote them
but it kept all the user directories intact.


-- 

Brian G. Moore, School of Science, Penn State Erie--The Behrend College
[EMAIL PROTECTED] , (814)-898-6334

------------------------------

From: Jay Hall <[EMAIL PROTECTED]>
Subject: Re: ftp automated batch copy
Date: Thu, 27 Jul 2000 18:30:06 GMT


m.hoes wrote:
> 
> 
> Currently, I am trying to do a automated/batched/scripted copy of a
> directory tree and all files in it from one system to another. I do not 
know
> in advance what the files are called, so i will have to be using 
wildcards
> like *. Due to security restrictions which are enforced by other parties
> which I am unable to influence, the only available connection method to 
me
> between these systems is by ftp.
> 
> Currently I seem to be facing two issues.
> 
> The first is that, as far as i can tell, ftp seems to be unable to copy
> subdirectorys. Is there a way to make ftp copy subdirectorys as well, or 
is
> there an enhanced ftp client available which is able to do this?
> 
> The second issue is that, when i use ftp using the mput/mget * command, 
ftp
> seems to want a manual confirmation of each file i am trying to copy. 
This
> makes it unpractical for automated/scripted purposes. Is there a way 
around
> this?
> 
> 
> All suggestions are more than welcome.
> 
> 
> 
> 

You can get around mput and mget asking for confirmation for each file by 
using the -i option when invoking ftp.  -i turns off interactive prompting.



Jay


--
Posted via CNET Help.com
http://www.help.com/

------------------------------

From: -ljl- <[EMAIL PROTECTED]>
Subject: Re: sys notification and CRON
Date: Thu, 27 Jul 2000 18:28:12 GMT

In article <[EMAIL PROTECTED]>,
  [EMAIL PROTECTED] wrote:
> In article <[EMAIL PROTECTED]>,
> jtoy  <[EMAIL PROTECTED]> wrote:
> >When stuff gets done on my system such as job notification from CRON
> >that the job was completed, I get an email to root.  I have cron jobs
> >that run every hour, so after a day I get around 50 emails that I
delete
> >by hand.  How can I surpress certian system emails such as CRON job
> >emails?  Thanks
>
> You need to specifiy what you want done with stdout and stderr. As an
example
>
> 50 23 * * * /home/wrm/bin/make-gif hd6 >/dev/null 2>&1
>
> redirects stdout to /dev/null and the 2>&1 says to lump stderr into
stdout.

You have offered a better alternative to using 'MAILTO=""', which
sends _all_ of cron's messages to null.  Your method can be applied
selectively.

Also, I've used procmail's (.procmailrc) ability to send cron's
message to different mailboxes, this creates logs without junking
up your mailbox.  Although I have never done it, think procmail's
ability to filter Header and Body could be used to direct important
mails to root's mbox.

--
Louis-ljl-{ Louis J. LaBash, Jr. }


Sent via Deja.com http://www.deja.com/
Before you buy.

------------------------------

From: [EMAIL PROTECTED] (Andrew J. Perrin)
Subject: Install without floppy or CD?
Date: 27 Jul 2000 14:47:06 -0400

Greetings.

We have an IBM laptop that runs Win95 at the moment, and we'd like to
install linux on it instead, preferably RedHat because that's what
we've got running elsewhere.

The catch is, the floppy drive to the thing has long since
disappeared, and we don't have a CD ROM for it.  It does have a
network connection, though, so we can mount a CD over the net.

Any ideas on how this might be done?

Thanks.

-- 
==============================================================
Andrew J. Perrin    -     UC Berkeley, Sociology & Demography
Consulting: Solaris-Linux-NT-Samba-Perl-MS Access-Postgres
[EMAIL PROTECTED] - http://demog.berkeley.edu/~aperrin
==============================================================

------------------------------

From: [EMAIL PROTECTED] (Dances With Crows)
Subject: Re: "dd" copy fails to copy errors
Date: 27 Jul 2000 18:52:37 GMT
Reply-To: [EMAIL PROTECTED]

On Thu, 27 Jul 2000 15:30:26 GMT, Rasputin wrote:
>[EMAIL PROTECTED] <Dances With Crows> wrote:
>>Not always!  Back in the old days, there were some copy-protected DOS
>>games where the copy-protection depended on the presence of a bad sector
>>(or more than one) at a specific spot on the disk.  The copy-protection
>>code would read that sector, and if it was able to read that sector, it
>>would issue a nasty error message and halt the system.
>
>I remember hearing the same thing when friends of mine were thinking of
>burning, erm, 'offsite backups' of certain PSX games.
>I put it down as a urban myth at the time, though.

Saw that happen on a few Apple ][ games.  Never saw it happen myself on
a DOS game, but that was because I never used a PC until '95 or '96.

The PSX discs do something slightly different--IIRC, they have certain
data written into the pregap or TOC, which is a bit difficult to reach
with a normal CD-burner.  If the PSX can't find the data there, it
barfs, unless it's been mod-chipped.

*Sigh*.  From "Copy II+" in the Apple ][ days to mod-chipping to DeCSS,
I'd think it's been proven that copy-protection is a bloody horrible
failure that inconveniences users and slows pirates not a bit, but
obviously those in control don't think so.

-- 
Matt G|There is no Darkness in Eternity/But only Light too dim for us to see
Brainbench MVP for Linux Admin /   Tyranny is always better organized
http://www.brainbench.com     /    than freedom.
=============================/              ==Charles Peguy

------------------------------

From: Akira Yamanita <[EMAIL PROTECTED]>
Subject: Re: newbie: apache problem
Date: Thu, 27 Jul 2000 19:03:42 GMT

John Cohen wrote:
> 
> i installed redhat6.2, everything else works but apache server. when i tried
> "lynx localhost" i got 403/forbidden error and the following in error log:
> [Thu Jul 27 11:25:53 2000] [warn] NameVirtualHost xxx.xxx.xxx.xxx:80 has no
> VirtualHosts [Thu Jul 27 11:25:53 2000] [crit] (98)Address already in use:
> make_sock: could not bind to port 80
> 
> what does that mean, and how can i fix the problem? Thanks for any info.

Check /etc/httpd/conf/httpd.conf.

You have a line like this:

NameVirtualHost xxx.xxx.xxx.xxx:80

But then you don't have another section that defines it
that should be something like this:

<VirtualHost xxx.xxx.xxx.xxx:80>
        DocumentRoot /hosts/docs
        ... other parameters
</VirtualHost>

That's just a warning so I don't think that's what's causing the
problem (though you should fix that if you want the virtual host
to work or if you're not using one).

Look for: <Files ~ >
Change to: <Files ~ "^\.ht">

Restart Apache: killall -USR1 httpd

Should work.

------------------------------

From: Mike Schiraldi <[EMAIL PROTECTED]>
Subject: highlight stderr, leave stdout alone
Date: Thu, 27 Jul 2000 15:05:22 -0400

I've always been on the lookout for a way of somehow highlighting a
program's stderr output while leaving its stdout alone. I never found
anything, so i wrote the attached program. Unfortunately, i can't seem to
run a shell with it - the shell immediately exists for some reason.

Is there a flaw in the program? Is there a better way of accomplishing my
goal?

In case you can't tell, here's how it works:

- a pipe is opened
- the program forks
- the child closes stderr and uses the pipe as its stderr
- the child executes the command
- the parent prints out anything from the pipe, surrounding it with ansi
codes to highlight it

#include <stdio.h>
#include <unistd.h>
#include <errno.h>
#include <signal.h>
#include <sys/wait.h>

#define HEADER "\e[31m"
#define FOOTER "\e[0m"

#define BUF_MAX 8192

int main(int argc, char ** argv) {

  char buf[BUF_MAX];
  int p[2];
  int f;
  int status;

  if(argc < 2) {
    printf("Specify a program to run, you clod.\n");
    return 1;
  }

  if(pipe(p)) {
    printf("Couldn't get a pipe! %s\n", strerror(errno));
    return 1;
  }

  f = fork();

  if(f == -1) {
    printf("Couldn't fork!\n");
    return 1;
  }

  if(f) {    
    close(p[1]);
    do {
      f = read(p[0], buf, BUF_MAX - 1);
      if(f > 0) {
        buf[f] = 0;
        fprintf(stderr, "%s%s%s",HEADER, buf, FOOTER); 
      }
    } while(f > 0);
    wait(&status); 
    return WEXITSTATUS(status);
  }
  else {
    close(p[0]);
    close(fileno(stderr));
    p[1] = dup2(p[1], fileno(stderr)); 

    if(p[1] == -1) {
      printf("dup2 failed! %s\n", strerror(errno));
      return 1;
    }
   stderr = fdopen(p[1], "w");

    execvp(argv[1], &argv[1]);
    printf("exec failed! %s\n", strerror(errno));
    return 1;
  }
}




------------------------------


** FOR YOUR REFERENCE **

The service address, to which questions about the list itself and requests
to be added to or deleted from it should be directed, is:

    Internet: [EMAIL PROTECTED]

You can send mail to the entire list (and comp.os.linux.misc) via:

    Internet: [EMAIL PROTECTED]

Linux may be obtained via one of these FTP sites:
    ftp.funet.fi                                pub/Linux
    tsx-11.mit.edu                              pub/linux
    sunsite.unc.edu                             pub/Linux

End of Linux-Misc Digest
******************************

Reply via email to