send file descriptor via ipc

2005-02-26 Thread Yan Yu
Hello, there, I am looking for the function that handle send/recv file descriptors through sendmsg/recvmsg? by looking through source files, unp_internalize/unp_externalize in kern/uipc-usrreq.c seems relevant.. but i am not sure since i could not guess the meaning of the function name.. (btw,

confusion on fopen()/falloc()

2005-02-26 Thread Yan Yu
Hello, all, I have a user program as below: FILE *fd; while (1) { fd= fopen( "tmp", "r" ); if ( fd == NULL ) break; } from my understanding, since i open the same file to read, my process should create a new file descriptor each time when fopen is called. Therefore,

Re: confusion on fopen()/falloc()

2005-02-26 Thread Yan Yu
On Sat, 26 Feb 2005, Yan Yu wrote: > Hello, all, > I have a user program as below: > FILE *fd; > while (1) > { > fd= fopen( "tmp", "r" ); > if ( fd == NULL ) > break; > } > > from my understanding, since i open the same file to read, my process > should create a new file

Re: send file descriptor via ipc

2005-02-26 Thread John-Mark Gurney
Yan Yu wrote this message on Sat, Feb 26, 2005 at 00:58 -0800: > Hello, there, > I am looking for the function that handle send/recv file descriptors > through sendmsg/recvmsg? > by looking through source files, > unp_internalize/unp_externalize in kern/uipc-usrreq.c seems relevant.. > > but i a

Re: confusion on fopen()/falloc()

2005-02-26 Thread John-Mark Gurney
Yan Yu wrote this message on Sat, Feb 26, 2005 at 01:10 -0800: > Hello, all, > I have a user program as below: > FILE *fd; > while (1) > { > fd= fopen( "tmp", "r" ); > if ( fd == NULL ) > break; > } > > from my understanding, since i open the same file to read, my process

Re: Sharing data between user space and kernel

2005-02-26 Thread ALeine
[EMAIL PROTECTED] wrote: > Could you please point me to the place where "GEOM > gstat" is implemented ? I don't seem to find it :-( You can find gstat in src/usr.sbin/gstat if you have the source tree on your disk or online at: http://www.freebsd.org/cgi/cvsweb.cgi/src/usr.sbin/gstat/ ALeine

Re: send file descriptor via ipc

2005-02-26 Thread Robert Watson
On Sat, 26 Feb 2005, Yan Yu wrote: > I am looking for the function that handle send/recv file descriptors > through sendmsg/recvmsg? by looking through source files, > unp_internalize/unp_externalize in kern/uipc-usrreq.c seems relevant.. > > but i am not sure since i could not guess the mea

RE: sched_4bsd.c Quantum change

2005-02-26 Thread Smith III, Edward Mr. CAA/ISC
just use the "nice" call with a negative value for the process. the time quantum will be the same but it will get more run time. man nice -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Ashwin Chandra Sent: Thursday, February 24, 2005 7:50 PM To: freebsd-h

sandisk cruzer mini quirks [failure] on RELENG_4

2005-02-26 Thread Peter C. Lai
I have a 512mb version of the SanDisk Cruzer Mini keychain drive. ProductId = 0x5150 (VendorID=0x0781). I am unable to correctly get it to stop crashing the system when using cp(1) to copy large files to it. I patched /usr/src/sys/dev/usb/umass.c as: if (UGETW(dd->idVendor) == USB_VENDOR_SANDISK &

Re: sandisk cruzer mini quirks [failure] on RELENG_4

2005-02-26 Thread ALeine
[EMAIL PROTECTED] wrote: > I have a 512mb version of the SanDisk Cruzer Mini keychain drive. > ProductId = 0x5150 (VendorID=0x0781). I am unable to correctly > get it to stop crashing the system when using cp(1) to copy large > files to it. > I patched /usr/src/sys/dev/usb/umass.c as: > > if (UG

Re: [PATCH] Dangerous jail()<->ioctl interactions.

2005-02-26 Thread Wojciech A. Koszek
On Thu, Feb 24, 2005 at 01:03:17AM +0800, Xin LI wrote: > On Mon, Feb 21, 2005 at 10:16:56PM +, Wojciech A. Koszek wrote: > > Hello hackers, > > I would like to let you know I've been doing [partial] audit of ioctl() [..] > > connections. > Default devfs configuration for a jail is not to mount

Re: send file descriptor via ipc

2005-02-26 Thread Jiawei Ye
On Sat, 26 Feb 2005 01:39:07 -0800, John-Mark Gurney <[EMAIL PROTECTED]> wrote: > You can also look at unix(4) which has a brief description.. You must > use unix domain sockets in order to pass file descriptors, and so the > unp probably refers to UNix Protocol... but I could be wrong about > th

function prototype of fdrop() and fdrop_locked() in kern_descrip.c

2005-02-26 Thread Yan Yu
HI, all, I have a Q on the input parameter of fdrop() and fdrop_locked() in kern/kern_descrip.c. i am curious about the design choice of their input parameter. currently, it is defined as A) fdrop( struct file *, struct thread *) -