Re: cannot print to remote printer
Anton Berezin [EMAIL PROTECTED] wrote: if (fork() == 0) { - signal(SIGCHLD, SIG_IGN); + signal(SIGCHLD, SIG_DFL); This is unportable. If you want automatic zombie reaping, better don't use the simplified signal(3) handling, but instead spell it out as sigaction(2) using the SA_NOCLDWAIT flag. The above won't even give you a warning on systems that don't implement automatic zombie reaping, while with sicaction, you'll get a compile-time error for SA_NOCLDWAIT not being defined. -- cheers, Jorg .-.-. --... ...-- -.. . DL8DTL http://www.sax.de/~joerg/NIC: JW11-RIPE Never trust an operating system you don't have sources for. ;-) To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-current in the body of the message
No more snapshots of -CURRENT?
Hi all... I have been visiting current.freebsd.org for the past weeks, and see no newer i386 snapshots then 20010618. Does it mean -CURRENT is in no stable condition right now? tq /john Live Free OR Die To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-current in the body of the message
Re: No more snapshots of -CURRENT?
* John Indra [EMAIL PROTECTED] [010712 01:51] wrote: Hi all... I have been visiting current.freebsd.org for the past weeks, and see no newer i386 snapshots then 20010618. Does it mean -CURRENT is in no stable condition right now? current is never stable, if you want stable stil with -stable. :) -- -Alfred Perlstein [[EMAIL PROTECTED]] Ok, who wrote this damn function called '??'? And why do my programs keep crashing in it? To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-current in the body of the message
Re: No more snapshots of -CURRENT?
On Thu, Jul 12, 2001 at 02:08:34AM -0500, Alfred Perlstein wrote: newer i386 snapshots then 20010618. Does it mean -CURRENT is in no stable condition right now? current is never stable, if you want stable stil with -stable. :) I KNOW. That's why I put double quotes around the stable word from the first place ;) The first intention was just to ask why aren't there newer snapshots then 20010618. I am thinking of installing newest snapshots on my PC. Thanks anyway... /john Live Free OR Die To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-current in the body of the message
Re: cannot print to remote printer
On Thu, Jul 12, 2001 at 08:45:55AM +0200, Joerg Wunsch wrote: Anton Berezin [EMAIL PROTECTED] wrote: if (fork() == 0) { - signal(SIGCHLD, SIG_IGN); + signal(SIGCHLD, SIG_DFL); This is unportable. If you want automatic zombie reaping, better don't use the simplified signal(3) handling, but instead spell it out as sigaction(2) using the SA_NOCLDWAIT flag. The above won't even give you a warning on systems that don't implement automatic zombie reaping, while with sicaction, you'll get a compile-time error for SA_NOCLDWAIT not being defined. Umm, I don't understand. I do not want automatic zombie reaping, I want exactly the opposite, and my patch does just that. Cheers, \Anton. -- May the tuna salad be with you. To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-current in the body of the message
Re: No more snapshots of -CURRENT?
Alfred Perlstein wrote: * John Indra [EMAIL PROTECTED] [010712 01:51] wrote: Hi all... I have been visiting current.freebsd.org for the past weeks, and see no newer i386 snapshots then 20010618. Does it mean -CURRENT is in no stable condition right now? current is never stable, if you want stable stil with -stable. :) No, current.freebsd.org had a hardware failure and lots of stuff was lost and has not yet been restored. This includes the snapshot builder scripts. :-] Cheers, -Peter -- Peter Wemm - [EMAIL PROTECTED]; [EMAIL PROTECTED]; [EMAIL PROTECTED] All of this is for nothing if we don't go to the stars - JMS/B5 To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-current in the body of the message
Re: No more snapshots of -CURRENT?
On Thu, Jul 12, 2001 at 05:31:30AM -0700, Peter Wemm wrote: Alfred Perlstein wrote: * John Indra [EMAIL PROTECTED] [010712 01:51] wrote: Hi all... I have been visiting current.freebsd.org for the past weeks, and see no newer i386 snapshots then 20010618. Does it mean -CURRENT is in no stable condition right now? current is never stable, if you want stable stil with -stable. :) No, current.freebsd.org had a hardware failure and lots of stuff was lost and has not yet been restored. This includes the snapshot builder scripts. :-] We (Michael Lyngbøl any myself) could probably fix something at ftp.dk.FreeBSD.org if there was any interest ? /Jesper -- Jesper Skriver, jesper(at)skriver(dot)dk - CCIE #5456 Work:Network manager @ AS3292 (Tele Danmark DataNetworks) Private: FreeBSD committer @ AS2109 (A much smaller network ;-) One Unix to rule them all, One Resolver to find them, One IP to bring them all and in the zone to bind them. To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-current in the body of the message
Re: No more snapshots of -CURRENT?
Jesper Skriver wrote: On Thu, Jul 12, 2001 at 05:31:30AM -0700, Peter Wemm wrote: Alfred Perlstein wrote: * John Indra [EMAIL PROTECTED] [010712 01:51] wrote: Hi all... I have been visiting current.freebsd.org for the past weeks, and see no newer i386 snapshots then 20010618. Does it mean -CURRENT is in no sta ble condition right now? current is never stable, if you want stable stil with -stable. :) No, current.freebsd.org had a hardware failure and lots of stuff was lost and has not yet been restored. This includes the snapshot builder scripts. :-] We (Michael Lyngbøl any myself) could probably fix something at ftp.dk.FreeBSD.org if there was any interest ? Actually, I think we just need to pester jkh nicely to get somebody to copy over the stable build script, s/stable/current/, s/-rRELENG_4/-A/ and fire it up. Cheers, -Peter -- Peter Wemm - [EMAIL PROTECTED]; [EMAIL PROTECTED]; [EMAIL PROTECTED] All of this is for nothing if we don't go to the stars - JMS/B5 To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-current in the body of the message
Re: No more snapshots of -CURRENT?
On Thu, Jul 12, 2001 at 05:49:59AM -0700, Peter Wemm wrote: Jesper Skriver wrote: On Thu, Jul 12, 2001 at 05:31:30AM -0700, Peter Wemm wrote: Alfred Perlstein wrote: * John Indra [EMAIL PROTECTED] [010712 01:51] wrote: Hi all... I have been visiting current.freebsd.org for the past weeks, and see no newer i386 snapshots then 20010618. Does it mean -CURRENT is in no sta ble condition right now? current is never stable, if you want stable stil with -stable. :) No, current.freebsd.org had a hardware failure and lots of stuff was lost and has not yet been restored. This includes the snapshot builder scripts. :-] We (Michael Lyngbøl any myself) could probably fix something at ftp.dk.FreeBSD.org if there was any interest ? Actually, I think we just need to pester jkh nicely to get somebody to copy over the stable build script, s/stable/current/, s/-rRELENG_4/-A/ and fire it up. Ok, we won't do anything then ... /Jesper -- Jesper Skriver, jesper(at)skriver(dot)dk - CCIE #5456 Work:Network manager @ AS3292 (Tele Danmark DataNetworks) Private: FreeBSD committer @ AS2109 (A much smaller network ;-) One Unix to rule them all, One Resolver to find them, One IP to bring them all and in the zone to bind them. To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-current in the body of the message
Re: No more snapshots of -CURRENT?
No, it simply means that the machine has been too ill to make snapshots for awhile. We're in the process of replacing it, but everyone involved has been really busy. :( - Jordan From: John Indra [EMAIL PROTECTED] Subject: No more snapshots of -CURRENT? Date: Thu, 12 Jul 2001 13:50:34 +0700 Hi all... I have been visiting current.freebsd.org for the past weeks, and see no newer i386 snapshots then 20010618. Does it mean -CURRENT is in no stable condition right now? tq /john Live Free OR Die To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-current in the body of the message To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-current in the body of the message
Re: No more snapshots of -CURRENT?
From: Peter Wemm [EMAIL PROTECTED] Subject: Re: No more snapshots of -CURRENT? Date: Thu, 12 Jul 2001 05:49:59 -0700 Actually, I think we just need to pester jkh nicely to get somebody to copy over the stable build script, s/stable/current/, s/-rRELENG_4/-A/ and fire it up. I'm willing to do it, we just need to coordinate with the Qwest folks since I still can't even get into the (new) box. :) - Jordan To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-current in the body of the message
Re: cannot print to remote printer
At 8:45 AM +0200 7/12/01, Joerg Wunsch wrote: Anton Berezin [EMAIL PROTECTED] wrote: if (fork() == 0) { - signal(SIGCHLD, SIG_IGN); + signal(SIGCHLD, SIG_DFL); This is unportable. His change is pretty portable, as I have been running RPI's version of lpd with the exact same change on several non-BSD operating systems for about five years now... If you want automatic zombie reaping, better don't use the simplified signal(3) handling, but instead spell it out as sigaction(2) using the SA_NOCLDWAIT flag. I don't think we're interested in automatic zombie reaping, but I'll parenthetically note that I do intend to switch lpr friends over to using posix (sigaction) signal handling. I did eventually have to do that for some platform we (RPI) run lpr on, so it's just another area where I have to extract RPI's updates and fit them to current freebsd source. I'm going to do that separate from this bug fix though, as that is low priority on the list of lpr changes I have in mind. -- Garance Alistair Drosehn= [EMAIL PROTECTED] Senior Systems Programmer or [EMAIL PROTECTED] Rensselaer Polytechnic Instituteor [EMAIL PROTECTED] To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-current in the body of the message
Re: cannot print to remote printer
Anton Berezin [EMAIL PROTECTED] writes: On Thu, Jul 12, 2001 at 08:45:55AM +0200, Joerg Wunsch wrote: Anton Berezin [EMAIL PROTECTED] wrote: if (fork() == 0) { - signal(SIGCHLD, SIG_IGN); + signal(SIGCHLD, SIG_DFL); This is unportable. If you want automatic zombie reaping, better don't use the simplified signal(3) handling, but instead spell it out as sigaction(2) using the SA_NOCLDWAIT flag. The above won't even give you a warning on systems that don't implement automatic zombie reaping, while with sicaction, you'll get a compile-time error for SA_NOCLDWAIT not being defined. Umm, I don't understand. I do not want automatic zombie reaping, I want exactly the opposite, and my patch does just that. I might be wrong in many ways, but... is it then mandatory that you `reset' SIGCHLD to SIG_DFL ? Why not leave it in it's default state, and make this patch: - signal(SIGCHLD, SIG_IGN); without adding any lines? I'm in a wild rush, and I don't have the time to actually look at the code or test it. I will, soon, though... -giorgos To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-current in the body of the message
Re: cannot print to remote printer
On 12 Jul 2001 22:40:12 +0300, Giorgos Keramidas [EMAIL PROTECTED] said: I might be wrong in many ways, but... is it then mandatory that you `reset' SIGCHLD to SIG_DFL ? Possibly. In the general case (as specified by standards), what happens to SIGCHLD if it was set to SIG_IGN before exec() is ill-defined. Some systems will inherit the SIG_IGN setting, which will then cause any executed program that depends on wait() working (e.g., shells) to fail. The new POSIX draft, at least, sanctions the automatic reset of SIGCHLD to SIG_DFL upon exec(). -GAWollman To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-current in the body of the message
Re: cannot print to remote printer
On Thu, Jul 12, 2001 at 10:40:12PM +0300, Giorgos Keramidas wrote: Anton Berezin [EMAIL PROTECTED] writes: Umm, I don't understand. I do not want automatic zombie reaping, I want exactly the opposite, and my patch does just that. I might be wrong in many ways, but... is it then mandatory that you `reset' SIGCHLD to SIG_DFL ? Why not leave it in it's default state, and make this patch: - signal(SIGCHLD, SIG_IGN); without adding any lines? The problem is that at this point it is not in its default state. Several screenfuls above this line, in the same function (main()), there is a line signal(SIGCHLD, reapchild); I'm in a wild rush, and I don't have the time to actually look at the code or test it. I will, soon, though... :-) =Anton. -- May the tuna salad be with you. To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-current in the body of the message
oddity with dump(8) or sa(4) in -current
This is a new issue [was not present in -current a few months ago]. Attempting a dump to an HP C1533A DDS-2 drive, dump seems to freeze the tape at EOT. Inserting the next volume of the dump and typing yes only produces write errors. Performing an `mt rewind`, prior to typing yes clears the state, and allows the dump to continue. What's up with this? I can test changes to fix this if someone has a clue as to what is changed here. Not everyone can afford DLT for a single-tape backup, so this can be an issue effecting many freebsd users. - sa0 at ahc0 bus 0 target 5 lun 0 sa0: HP C1533A 9503 Removable Sequential Access SCSI-2 device sa0: 10.000MB/s transfers (10.000MHz, offset 8) - Jul 12 07:45:00 wahoo /boot/kernel/kernel: (sa0:ahc0:0:5:0): WRITE FILEMARKS. CDB: 10 0 0 0 2 0 Jul 12 07:45:00 wahoo /boot/kernel/kernel: (sa0:ahc0:0:5:0): CAM Status: SCSI Status Error Jul 12 07:45:00 wahoo /boot/kernel/kernel: (sa0:ahc0:0:5:0): SCSI Status: Check Condition Jul 12 07:45:00 wahoo /boot/kernel/kernel: (sa0:ahc0:0:5:0): NO SENSE asc:0,2 Jul 12 07:45:00 wahoo /boot/kernel/kernel: (sa0:ahc0:0:5:0): End-of-partition/medium detected Jul 12 07:45:00 wahoo /boot/kernel/kernel: (sa0:ahc0:0:5:0): Retries Exhausted Jul 12 07:45:00 wahoo /boot/kernel/kernel: (sa0:ahc0:0:5:0): failed to write terminating filemark(s) Jul 12 07:45:00 wahoo /boot/kernel/kernel: (sa0:ahc0:0:5:0): tape is now frozen- use an OFFLINE, REWIND or MTEOM command to clear this state. Jul 12 07:45:00 wahoo /boot/kernel/kernel: (sa0:ahc0:0:5:0): tape is now frozen- use an OFFLINE, REWIND or MTEOM command to clear this state. jim -- ET has one helluva sense of humor! He's always anal-probing right-wing schizos! _ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-current in the body of the message
Re: oddity with dump(8) or sa(4) in -current
[ moved to scsi, followup there ] Hard to say. It looks like we're somehow missing early warning and going all the way to end of tape. I've had real trouble reproducing this situation. I've had some reports, but I've not been able to really make it happen for me, and, yes, I use DDS tapes also. Are you in set in fixed block or variable block mode? -matt On Thu, 12 Jul 2001, Jim Bryant wrote: This is a new issue [was not present in -current a few months ago]. Attempting a dump to an HP C1533A DDS-2 drive, dump seems to freeze the tape at EOT. Inserting the next volume of the dump and typing yes only produces write errors. Performing an `mt rewind`, prior to typing yes clears the state, and allows the dump to continue. What's up with this? I can test changes to fix this if someone has a clue as to what is changed here. Not everyone can afford DLT for a single-tape backup, so this can be an issue effecting many freebsd users. - sa0 at ahc0 bus 0 target 5 lun 0 sa0: HP C1533A 9503 Removable Sequential Access SCSI-2 device sa0: 10.000MB/s transfers (10.000MHz, offset 8) - Jul 12 07:45:00 wahoo /boot/kernel/kernel: (sa0:ahc0:0:5:0): WRITE FILEMARKS. CDB: 10 0 0 0 2 0 Jul 12 07:45:00 wahoo /boot/kernel/kernel: (sa0:ahc0:0:5:0): CAM Status: SCSI Status Error Jul 12 07:45:00 wahoo /boot/kernel/kernel: (sa0:ahc0:0:5:0): SCSI Status: Check Condition Jul 12 07:45:00 wahoo /boot/kernel/kernel: (sa0:ahc0:0:5:0): NO SENSE asc:0,2 Jul 12 07:45:00 wahoo /boot/kernel/kernel: (sa0:ahc0:0:5:0): End-of-partition/medium detected Jul 12 07:45:00 wahoo /boot/kernel/kernel: (sa0:ahc0:0:5:0): Retries Exhausted Jul 12 07:45:00 wahoo /boot/kernel/kernel: (sa0:ahc0:0:5:0): failed to write terminating filemark(s) Jul 12 07:45:00 wahoo /boot/kernel/kernel: (sa0:ahc0:0:5:0): tape is now frozen- use an OFFLINE, REWIND or MTEOM command to clear this state. Jul 12 07:45:00 wahoo /boot/kernel/kernel: (sa0:ahc0:0:5:0): tape is now frozen- use an OFFLINE, REWIND or MTEOM command to clear this state. jim -- ET has one helluva sense of humor! He's always anal-probing right-wing schizos! _ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-current in the body of the message To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-current in the body of the message
Re: oddity with dump(8) or sa(4) in -current
[subscribing to FreeBSD-scsi as I type this] `mt status` shows variable as the default, and I am not specifying a blocksize to dump. Below is an example of how I am doing this, and all other partitions use the same options. /sbin/dump -0 -a -n -u -f /dev/nsa0 / On a side note, what happened to the raw device nodes [/dev/*rsa*]? I'm guessing that the lack of raw nodes doesn't make a diff, as /dev/*sa* are all character-mode devices. Matthew Jacob wrote: [ moved to scsi, followup there ] Hard to say. It looks like we're somehow missing early warning and going all the way to end of tape. I've had real trouble reproducing this situation. I've had some reports, but I've not been able to really make it happen for me, and, yes, I use DDS tapes also. Are you in set in fixed block or variable block mode? -matt On Thu, 12 Jul 2001, Jim Bryant wrote: This is a new issue [was not present in -current a few months ago]. Attempting a dump to an HP C1533A DDS-2 drive, dump seems to freeze the tape at EOT. Inserting the next volume of the dump and typing yes only produces write errors. Performing an `mt rewind`, prior to typing yes clears the state, and allows the dump to continue. What's up with this? I can test changes to fix this if someone has a clue as to what is changed here. Not everyone can afford DLT for a single-tape backup, so this can be an issue effecting many freebsd users. - sa0 at ahc0 bus 0 target 5 lun 0 sa0: HP C1533A 9503 Removable Sequential Access SCSI-2 device sa0: 10.000MB/s transfers (10.000MHz, offset 8) - Jul 12 07:45:00 wahoo /boot/kernel/kernel: (sa0:ahc0:0:5:0): WRITE FILEMARKS. CDB: 10 0 0 0 2 0 Jul 12 07:45:00 wahoo /boot/kernel/kernel: (sa0:ahc0:0:5:0): CAM Status: SCSI Status Error Jul 12 07:45:00 wahoo /boot/kernel/kernel: (sa0:ahc0:0:5:0): SCSI Status: Check Condition Jul 12 07:45:00 wahoo /boot/kernel/kernel: (sa0:ahc0:0:5:0): NO SENSE asc:0,2 Jul 12 07:45:00 wahoo /boot/kernel/kernel: (sa0:ahc0:0:5:0): End-of-partition/medium detected Jul 12 07:45:00 wahoo /boot/kernel/kernel: (sa0:ahc0:0:5:0): Retries Exhausted Jul 12 07:45:00 wahoo /boot/kernel/kernel: (sa0:ahc0:0:5:0): failed to write terminating filemark(s) Jul 12 07:45:00 wahoo /boot/kernel/kernel: (sa0:ahc0:0:5:0): tape is now frozen- use an OFFLINE, REWIND or MTEOM command to clear this state. Jul 12 07:45:00 wahoo /boot/kernel/kernel: (sa0:ahc0:0:5:0): tape is now frozen- use an OFFLINE, REWIND or MTEOM command to clear this state. jim -- ET has one helluva sense of humor! He's always anal-probing right-wing schizos! _ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-current in the body of the message
Re: cannot print to remote printer
As Anton Berezin wrote: - signal(SIGCHLD, SIG_IGN); + signal(SIGCHLD, SIG_DFL); Umm, I don't understand. I do not want automatic zombie reaping, I want exactly the opposite, and my patch does just that. Ah sorry, i was confused. -- cheers, Jorg .-.-. --... ...-- -.. . DL8DTL http://www.sax.de/~joerg/NIC: JW11-RIPE Never trust an operating system you don't have sources for. ;-) To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-current in the body of the message
Re: Lock of struct filedesc, file, pgrp, session and sigio
* Alfred Perlstein [EMAIL PROTECTED] [010712 01:45] wrote: * Alfred Perlstein [EMAIL PROTECTED] [010712 01:42] wrote: * Seigo Tanimura [EMAIL PROTECTED] [010711 19:08] wrote: The patch and the results of build test are now on the web page. The discussion of ktrace(2) problem does not cover the solution of BSD/OS, so it needs updating. I'm just reviewing the file stuff, I have a number of updates mainly in the areas of needing FFIND_HOLD/fdrop rather than just a simple FFIND. getvnode(p-p_fd, args-fd, fp); I'm quite sure should implicitly do a FHOLD operation on the returned struct file, i don't see this, at least not in linux_getdents() (compat/linux/linux_file.c). Or at least an fhold needs to be done before relasing the lock on the struct file. Furthermore, all the fo_* functions should not be calling FHOLD themselves, the fhold needs to have been done by whomever calls them to make sure that the 'fp' doesn't disapear out from under the fo_ function. -- -Alfred Perlstein [[EMAIL PROTECTED]] Ok, who wrote this damn function called '??'? And why do my programs keep crashing in it? To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-current in the body of the message
Re: cvs commit: src/lib/libpam Makefile.inc
At Thu, 12 Jul 2001 15:26:58 +0900, I wrote: Actually this doesn't help libpam.so.1, because the new pam modules (pam_*.so) do not work with it. Which means you need to recompile the programs linked with it, such as sudo, xdm, and the X server. Xwrapper I'm not sure I follow you here... M -- Mark Murray Warning: this .sig is umop ap!sdn To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-current in the body of the message
Re: Lock of struct filedesc, file, pgrp, session and sigio
On Thu, 12 Jul 2001 01:44:44 -0500, Alfred Perlstein [EMAIL PROTECTED] said: Alfred * Alfred Perlstein [EMAIL PROTECTED] [010712 01:42] wrote: * Seigo Tanimura [EMAIL PROTECTED] [010711 19:08] wrote: The patch and the results of build test are now on the web page. The discussion of ktrace(2) problem does not cover the solution of BSD/OS, so it needs updating. I'm just reviewing the file stuff, I have a number of updates mainly in the areas of needing FFIND_HOLD/fdrop rather than just a simple FFIND. getvnode(p-p_fd, args-fd, fp); I'm quite sure should implicitly do a FHOLD operation on the returned struct file, i don't see this, at least not in linux_getdents() (compat/linux/linux_file.c). Alfred Or at least an fhold needs to be done before relasing the lock Alfred on the struct file. Some functions modify a file descriptor, while others do not. At that point, what we need is a pair of FFIND and FFIND_LOCK. Both of them hold a file descriptor. FFIND_LOCK locks a file descriptor, while FFIND does not. -- Seigo Tanimura [EMAIL PROTECTED] [EMAIL PROTECTED] To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-current in the body of the message
Re: Lock of struct filedesc, file, pgrp, session and sigio
* Seigo Tanimura [EMAIL PROTECTED] [010711 19:08] wrote: The patch and the results of build test are now on the web page. The discussion of ktrace(2) problem does not cover the solution of BSD/OS, so it needs updating. Right now I'm only reviewing the file part and I'm only up to 'sys/i386/ibcs2/ibcs2_misc.c' in the diff. Here's a diff against your version and some comments so far: svr4_sys_putmsg svr4_sys_getmsg should not use FFIND, needs FFIND_HOLD fdesc_lookup probably should FFIND_HOLD to make sure the file doesn't go away. locking filedesc is probably not sufficient ibcs2_ioctl needs to be converted to FFIND_HOLD like linux's ioctl Basically, I'm pretty sure you need to FFIND_HOLD a lot more than you're doing in order to protect against shared file descriptor tables getting corrupted. diff --exclude=CVS -ur ./alpha/osf1/osf1_misc.c /usr/src/sys/alpha/osf1/osf1_misc.c --- ./alpha/osf1/osf1_misc.cThu Jul 12 08:04:26 2001 +++ /usr/src/sys/alpha/osf1/osf1_misc.c Thu Jul 12 06:21:21 2001 @@ -670,11 +670,12 @@ struct osf1_stat oub; int error; - FFIND(fp, p, SCARG(uap, fd)); + FFIND_HOLD(fp, p, uap-fd); if (fp == NULL) return (EBADF); error = fo_stat(fp, ub, p); + fdrop(fp, p); cvtstat2osf1(ub, oub); if (error == 0) error = copyout((caddr_t)oub, (caddr_t)SCARG(uap, sb), diff --exclude=CVS -ur ./alpha/osf1/osf1_mount.c /usr/src/sys/alpha/osf1/osf1_mount.c --- ./alpha/osf1/osf1_mount.c Thu Jul 12 08:04:26 2001 +++ /usr/src/sys/alpha/osf1/osf1_mount.cThu Jul 12 06:20:50 2001 @@ -154,7 +154,7 @@ struct statfs *sp; struct osf1_statfs osfs; - error = getvnode(p-p_fd, SCARG(uap, fd), fp); + error = getvnode(p-p_fd, uap-fd, fp); if (error) return (error); mp = ((struct vnode *)fp-f_data)-v_mount; diff --exclude=CVS -ur ./compat/linux/linux_file.c /usr/src/sys/compat/linux/linux_file.c --- ./compat/linux/linux_file.c Thu Jul 12 08:04:27 2001 +++ /usr/src/sys/compat/linux/linux_file.c Thu Jul 12 06:46:27 2001 @@ -139,11 +139,12 @@ SESS_LEADER(p) !(p-p_flag P_CONTROLT)) { struct file *fp; - FFIND(fp, p, p-p_retval[0]); + FFIND_HOLD(fp, p, p-p_retval[0]); SESS_UNLOCK(p-p_session); PROC_UNLOCK(p); if (fp-f_type == DTYPE_VNODE) fo_ioctl(fp, TIOCSCTTY, (caddr_t) 0, p); + fdrop(fp, p); } else { SESS_UNLOCK(p-p_session); PROC_UNLOCK(p); @@ -309,15 +310,19 @@ * significant effect for pipes (SIGIO is not delivered for * pipes under Linux-2.2.35 at least). */ - FFIND(fp, p, args-fd); + FFIND_HOLD(fp, p, args-fd); if (fp == NULL) return EBADF; - if (fp-f_type == DTYPE_PIPE) + if (fp-f_type == DTYPE_PIPE) { + fdrop(fp, p); return EINVAL; + } fcntl_args.cmd = F_SETOWN; fcntl_args.arg = args-arg; - return fcntl(p, fcntl_args); + error = fcntl(p, fcntl_args); + fdrop(fp, p); + return (error); } return EINVAL; } diff --exclude=CVS -ur ./compat/linux/linux_ioctl.c /usr/src/sys/compat/linux/linux_ioctl.c --- ./compat/linux/linux_ioctl.cThu Jul 12 08:04:27 2001 +++ /usr/src/sys/compat/linux/linux_ioctl.c Thu Jul 12 07:52:31 2001 @@ -1437,10 +1437,12 @@ printf(ARGS(ioctl, %d, %04lx, *), args-fd, args-cmd); #endif - FFIND_LOCK(fp, p, args-fd); - if (fp == NULL || (fp-f_flag (FREAD|FWRITE)) == 0) { - if (fp != NULL) - FILE_UNLOCK(fp); + FFIND_HOLD(fp, p, args-fd); + if (fp == NULL) + return (EBADF); + FILE_LOCK(fp); + if ((fp-f_flag (FREAD|FWRITE)) == 0) { + FILE_UNLOCK(fp); return (EBADF); } FILE_UNLOCK(fp); @@ -1451,9 +1453,11 @@ if (cmd = he-low cmd = he-high) { error = (*he-func)(p, args); if (error != ENOIOCTL) + fdrop(fp, p); return (error); } } + fdrop(fp, p); printf(linux: 'ioctl' fd=%d, cmd=0x%x ('%c',%d) not implemented\n, args-fd, (int)(args-cmd 0x), diff --exclude=CVS -ur ./compat/linux/linux_stats.c /usr/src/sys/compat/linux/linux_stats.c --- ./compat/linux/linux_stats.cThu Jul 12 08:04:27 2001 +++ /usr/src/sys/compat/linux/linux_stats.c Thu Jul 12 06:12:11 2001 @@ -218,11 +218,12 @@ printf(ARGS(newfstat, %d, *), args-fd); #endif - FFIND(fp, p, args-fd); + FFIND_HOLD(fp, p, args-fd); if (fp == NULL) return (EBADF); error = fo_stat(fp, buf, p); + fdrop(fp, p); if (!error) error = newstat_copyout(buf, args-buf); diff
Re: cvs commit: src/lib/libpam Makefile.inc
At Mon, 9 Jul 2001 11:16:33 -0700 (PDT), Mark Murray wrote: markm 2001/07/09 11:16:33 PDT Modified files: lib/libpam Makefile.inc Log: Bump the major number. The libraries API has changed incompatibly. Actually this doesn't help libpam.so.1, because the new pam modules (pam_*.so) do not work with it. Which means you need to recompile the programs linked with it, such as sudo, xdm, and the X server. As a workaround, you can overwrite libpam.so.1 with libpam.so.2 and everything should work fine. (Has the compatibility really lost?) -- / /__ __Akinori.org / MUSHA.org / ) ) ) ) / FreeBSD.org / Ruby-lang.org Akinori MUSHA aka / (_ / ( (__( @ iDaemons.org / and.or.jp Freeze this moment a little bit longer, make each impression a little bit stronger.. Experience slips away -- Time stand still To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-current in the body of the message
Re: Lock of struct filedesc, file, pgrp, session and sigio
* Seigo Tanimura [EMAIL PROTECTED] [010711 19:08] wrote: The patch and the results of build test are now on the web page. The discussion of ktrace(2) problem does not cover the solution of BSD/OS, so it needs updating. I'm just reviewing the file stuff, I have a number of updates mainly in the areas of needing FFIND_HOLD/fdrop rather than just a simple FFIND. getvnode(p-p_fd, args-fd, fp); I'm quite sure should implicitly do a FHOLD operation on the returned struct file, i don't see this, at least not in linux_getdents() (compat/linux/linux_file.c). How can I present you a delta in a good way? -- -Alfred Perlstein [[EMAIL PROTECTED]] Ok, who wrote this damn function called '??'? And why do my programs keep crashing in it? To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-current in the body of the message
Re: cvs commit: src/lib/libpam Makefile.inc
Oops, At Thu, 12 Jul 2001 15:26:58 +0900, I wrote: Actually this doesn't help libpam.so.1, because the new pam modules (pam_*.so) do not work with it. Which means you need to recompile the programs linked with it, such as sudo, xdm, and the X server. Xwrapper -- / /__ __Akinori.org / MUSHA.org / ) ) ) ) / FreeBSD.org / Ruby-lang.org Akinori MUSHA aka / (_ / ( (__( @ iDaemons.org / and.or.jp Freeze this moment a little bit longer, make each impression a little bit stronger.. Experience slips away -- Time stand still To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-current in the body of the message
ADV: How good are your IT skills?
Take the Skillometer Skills Challenge! Win $100! Get the recognition you deserve. As an accomplished IT professional, we invite you to take the Skillometer Skills Challenge.Skillometer provides web-based skills testing for current and leading-edge Information Technologies. Our tests measure the proficiency of the IT professional in a respective technology. If you're good enough, we'll feature you on our website. Choose your free Beta test, beat the high score, and we'll put your name and picture on our homepage. Win $100! Go to www.skillometer.com/indexbeta.asp.Fill out the form, choose the technologies in which you want to be tested, andyou'll immediately receive an email with a hyperlink to your test(s). If you qualify as a Top Scorer, you will be automatically entered into our $100 drawing for that test.The drawing for each test will be held after the test is released from Beta. Think you're good? Show everyone. Take the Skillometer Skills Challenge! We respect your time. If you would like to be removed from our mailing list, click on mailto:[EMAIL PROTECTED]?subject=REMOVE and add the email address(es) to removein your subject line. This message is designed to comply with all U.S. state laws and pending federal legislation regarding electronic mail marketing. You can avoid seeing compliant messages by setting your mail reader to filter messages with "ADV:" at the beginning of the Subject line. Submit questions or comments regarding these matters by clicking on mailto:[EMAIL PROTECTED]?subject=COMPLIANCE. Skillometer, LLC Manor Oak One, Suite 170 1910 Cochran Road Pittsburgh, PA 15220 (010712)
Re: Lock of struct filedesc, file, pgrp, session and sigio
* Alfred Perlstein [EMAIL PROTECTED] [010712 01:42] wrote: * Seigo Tanimura [EMAIL PROTECTED] [010711 19:08] wrote: The patch and the results of build test are now on the web page. The discussion of ktrace(2) problem does not cover the solution of BSD/OS, so it needs updating. I'm just reviewing the file stuff, I have a number of updates mainly in the areas of needing FFIND_HOLD/fdrop rather than just a simple FFIND. getvnode(p-p_fd, args-fd, fp); I'm quite sure should implicitly do a FHOLD operation on the returned struct file, i don't see this, at least not in linux_getdents() (compat/linux/linux_file.c). Or at least an fhold needs to be done before relasing the lock on the struct file. -- -Alfred Perlstein [[EMAIL PROTECTED]] Ok, who wrote this damn function called '??'? And why do my programs keep crashing in it? To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-current in the body of the message