Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 26 Aug 2003 15:19:57 -0500
From:      "Charles Howse" <chowse@charter.net>
To:        <questions@freebsd.org>
Subject:   RE: Detect floppy diskette
Message-ID:  <002b01c36c0f$6b55cc00$04fea8c0@moe>
In-Reply-To: <002a01c36c0c$af801500$04fea8c0@moe>

next in thread | previous in thread | raw e-mail | index | archive | help
> > Try this:

#!/usr/bin/perl

use POSIX qw/:fcntl_h dup2 setsid/;
if (fork) { exit; }
setsid;
=20
my $fd =3D POSIX::open "/dev/null", O_WRONLY or die "Can't open=20
/dev/null: $!\n";
dup2 $fd, 0;
dup2 $fd, 1;
dup2 $fd, 2;

sleep 5;
=20
system "sudo mount /dev/fd0 /mnt";


Maybe I'm doing something wrong, all this script does is run and exit
with status 0, whether I have a diskette in the drive or not.  No output
to screen or anything.




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?002b01c36c0f$6b55cc00$04fea8c0>