Re: inotify and /proc/

2007-07-31 Thread Valdis . Kletnieks
On Mon, 30 Jul 2007 22:56:27 CDT, Joseph Pingenot said: > From Al Viro on Tuesday, 31 July, 2007: > >On Mon, Jul 30, 2007 at 10:40:59PM -0500, Joseph Pingenot wrote: > >> I'm trying to implement pwait. It blocks until a specified PID exits, > >> and then it exits. > >er... ptrace(2)? > > Should

Re: inotify and /proc/

2007-07-31 Thread Andrew Morton
On Tue, 31 Jul 2007 20:31:49 +0200 Diego Calleja <[EMAIL PROTECTED]> wrote: > El Mon, 30 Jul 2007 22:25:21 -0500, Joseph Pingenot <[EMAIL PROTECTED]> > escribió: > > > More background, please? > > > > What's the way to check for a process exiting without spinning? > > > I don't know if it's u

Re: inotify and /proc/

2007-07-31 Thread Diego Calleja
El Mon, 30 Jul 2007 22:25:21 -0500, Joseph Pingenot <[EMAIL PROTECTED]> escribió: > More background, please? > > What's the way to check for a process exiting without spinning? I don't know if it's useful for you, but CONFIG_CONNECTOR and CONFIG_PROC_EVENTS will report process creation/exit/fo

Re: inotify and /proc/

2007-07-31 Thread Ray Lee
On 7/30/07, Joseph Pingenot <[EMAIL PROTECTED]> wrote: > What's the way to check for a process exiting without spinning? I think you can get it from the taskstats interface, though I haven't tried it. See Documentation/accounting/ for details. Ray - To unsubscribe from this list: send the line "u

Re: inotify and /proc/

2007-07-30 Thread Chris Friesen
Joseph Pingenot wrote: While we're on the subject, is there some way to receive notification that some aspect of a process changes (in this case, stopping using CPU, but not exiting). For some internal stuff a while back I did a patch that allows any process to register for status change

Re: inotify and /proc/

2007-07-30 Thread Al Viro
On Mon, Jul 30, 2007 at 10:56:27PM -0500, Joseph Pingenot wrote: > >From Al Viro on Tuesday, 31 July, 2007: > >On Mon, Jul 30, 2007 at 10:40:59PM -0500, Joseph Pingenot wrote: > >> I'm trying to implement pwait. It blocks until a specified PID exits, > >> and then it exits. > >er... ptrace(2)? >

Re: inotify and /proc/

2007-07-30 Thread Joseph Pingenot
>From Al Viro on Tuesday, 31 July, 2007: >On Mon, Jul 30, 2007 at 10:40:59PM -0500, Joseph Pingenot wrote: >> I'm trying to implement pwait. It blocks until a specified PID exits, >> and then it exits. >er... ptrace(2)? Should work for most common usage scenarios, although will suspect that it

Re: inotify and /proc/

2007-07-30 Thread Al Viro
On Mon, Jul 30, 2007 at 10:40:59PM -0500, Joseph Pingenot wrote: > I'm trying to implement pwait. It blocks until a specified PID exits, > and then it exits. er... ptrace(2)? - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED]

Re: inotify and /proc/

2007-07-30 Thread Kyle McMartin
On Mon, Jul 30, 2007 at 10:40:59PM -0500, Joseph Pingenot wrote: > From Al Viro on Tuesday, 31 July, 2007: > >On Mon, Jul 30, 2007 at 10:31:13PM -0500, Joseph Pingenot wrote: > >> >From Joseph Pingenot on Monday, 30 July, 2007: > >> >From Al Viro on Tuesday, 31 July, 2007: > >> >>On Mon, Jul 30, 20

Re: inotify and /proc/

2007-07-30 Thread Joseph Pingenot
>From Al Viro on Tuesday, 31 July, 2007: >On Mon, Jul 30, 2007 at 10:31:13PM -0500, Joseph Pingenot wrote: >> >From Joseph Pingenot on Monday, 30 July, 2007: >> >From Al Viro on Tuesday, 31 July, 2007: >> >>On Mon, Jul 30, 2007 at 09:16:16PM -0500, Joseph Pingenot wrote: >> >>> I was trying to use

Re: inotify and /proc/

2007-07-30 Thread Al Viro
On Mon, Jul 30, 2007 at 10:31:13PM -0500, Joseph Pingenot wrote: > >From Joseph Pingenot on Monday, 30 July, 2007: > >From Al Viro on Tuesday, 31 July, 2007: > >>On Mon, Jul 30, 2007 at 09:16:16PM -0500, Joseph Pingenot wrote: > >>> I was trying to use inotify to watch process changes (especially p

Re: inotify and /proc/

2007-07-30 Thread Al Viro
On Mon, Jul 30, 2007 at 10:25:21PM -0500, Joseph Pingenot wrote: > >From Al Viro on Tuesday, 31 July, 2007: > >On Mon, Jul 30, 2007 at 09:16:16PM -0500, Joseph Pingenot wrote: > >> I was trying to use inotify to watch process changes (especially process > >> termination) by watching /proc/. > >>

Re: inotify and /proc/

2007-07-30 Thread Joseph Pingenot
>From Joseph Pingenot on Monday, 30 July, 2007: >From Al Viro on Tuesday, 31 July, 2007: >>On Mon, Jul 30, 2007 at 09:16:16PM -0500, Joseph Pingenot wrote: >>> I was trying to use inotify to watch process changes (especially process >>> termination) by watching /proc/. >>> Sadly, although I could

Re: inotify and /proc/

2007-07-30 Thread Joseph Pingenot
>From Al Viro on Tuesday, 31 July, 2007: >On Mon, Jul 30, 2007 at 09:16:16PM -0500, Joseph Pingenot wrote: >> I was trying to use inotify to watch process changes (especially process >> termination) by watching /proc/. >> Sadly, although I could see something reading various files, nothing >> w

Re: inotify and /proc/

2007-07-30 Thread Al Viro
On Mon, Jul 30, 2007 at 09:16:16PM -0500, Joseph Pingenot wrote: > I was trying to use inotify to watch process changes (especially process > termination) by watching /proc/. > > Sadly, although I could see something reading various files, nothing > was issued when the process I was watching e

inotify and /proc/

2007-07-30 Thread Joseph Pingenot
I was trying to use inotify to watch process changes (especially process termination) by watching /proc/. Sadly, although I could see something reading various files, nothing was issued when the process I was watching exited and the directory went away. Is this intentional, or a bug? -Jose

Re: inotify and /proc?

2007-06-24 Thread Kyle Moffett
On Jun 22, 2007, at 18:51:10, C. Scott Ananian wrote: Back to kernel-land: in an IPv6 only world, it might make sense to export a /proc file compatible with the format of /etc/resolv.conf, with one DNS server address per line. If glibc uses/used inotify on /etc/resolv.conf, then symlinking

Re: inotify and /proc?

2007-06-22 Thread Al Viro
On Fri, Jun 22, 2007 at 06:51:10PM -0400, C. Scott Ananian wrote: > No, clearly inotify on all files in /proc is not the right thing to > do. But I'm writing support for "RDNSS in RA" -- IPv6 Router > Advertisement messages can include a DNS server specification, which > makes IPv6 completely au

Re: inotify and /proc?

2007-06-22 Thread C. Scott Ananian
On 6/21/07, Arnd Bergmann <[EMAIL PROTECTED]> wrote: On Thursday 21 June 2007, C. Scott Ananian wrote: > I'd like to make a read-only /proc file which supports inotify -- that > is, the kernel can send change notifications to userland via the > inotify mechanism. I've found fsnotify_modify() (in

Re: inotify and /proc?

2007-06-21 Thread Arnd Bergmann
On Thursday 21 June 2007, C. Scott Ananian wrote: > > I'd like to make a read-only /proc file which supports inotify -- that > is, the kernel can send change notifications to userland via the > inotify mechanism.  I've found fsnotify_modify() (in > include/linux/fsnotify.h) which seems to do what

inotify and /proc?

2007-06-21 Thread C. Scott Ananian
I'd like to make a read-only /proc file which supports inotify -- that is, the kernel can send change notifications to userland via the inotify mechanism. I've found fsnotify_modify() (in include/linux/fsnotify.h) which seems to do what I want, but it takes a struct dentry * -- how can I get a de