Re: dnotify (was: Re: How can i tell if another process is writing to a file?)

2005-09-29 Thread guy keren
On Thu, 29 Sep 2005, Yedidyah Bar-David wrote: On Thu, Sep 29, 2005 at 04:37:32AM +0300, guy keren wrote: just to make you happy, i went into the source tree, under Documentation/dnotify.txt. the text sais you can learn about various types of changes, that are NOT related to file

Re: dnotify (was: Re: How can i tell if another process is writing to a file?)

2005-09-29 Thread Yedidyah Bar-David
On Thu, Sep 29, 2005 at 01:17:03PM +0300, guy keren wrote: hopefully, not too fast - you should remember that there is no 2.7 kernel series any more - all the development is now done in the normal 2.6 kernel series, and they assume the distributions will do the stabilization work. Not only

Re: dnotify (was: Re: How can i tell if another process is writing to a file?)

2005-09-29 Thread Muli Ben-Yehuda
does someone know if the 'unstable work' on the 2.6 tree was official started? i do know that some non-trivial changes were made in recent versions (e.g. in 2.6.12, the SCSI sub-system supports plug-and-play - this means that SCSI disks would disappear right under your nose if your

How can i tell if another process is writing to a file?

2005-09-28 Thread Dvir Volk
here's the situation: i have a file, and i want to open it only when no other process is writing to it. but i don't have control over the possibly writing process, so i can't do advisory or mandatory locking. basically, i want to treat a file received by scp only after the download is

Re: How can i tell if another process is writing to a file?

2005-09-28 Thread Oleg Goldshmidt
Dvir Volk [EMAIL PROTECTED] writes: here's the situation: i have a file, and i want to open it only when no other process is writing to it. but i don't have control over the possibly writing process, so i can't do advisory or mandatory locking. basically, i want to treat a file received by

Re: How can i tell if another process is writing to a file?

2005-09-28 Thread guy keren
On Wed, 28 Sep 2005, Dvir Volk wrote: here's the situation: i have a file, and i want to open it only when no other process is writing to it. but i don't have control over the possibly writing process, so i can't do advisory or mandatory locking. basically, i want to treat a file received

Re: How can i tell if another process is writing to a file?

2005-09-28 Thread Muli Ben-Yehuda
On Wed, Sep 28, 2005 at 06:34:09PM +0300, guy keren wrote: On Wed, 28 Sep 2005, Dvir Volk wrote: here's the situation: i have a file, and i want to open it only when no other process is writing to it. but i don't have control over the possibly writing process, so i can't do advisory

RE: How can i tell if another process is writing to a file?

2005-09-28 Thread Tzahi Fadida
check out lsof and repeat mode, maybe it can somehow help you. Regards, tzahi. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Dvir Volk Sent: Wednesday, September 28, 2005 4:31 PM To: linux-il@linux.org.il Subject: How can i tell if

Re: How can i tell if another process is writing to a file?

2005-09-28 Thread guy keren
On Wed, 28 Sep 2005, Yedidyah Bar-David wrote: On Wed, Sep 28, 2005 at 06:34:09PM +0300, guy keren wrote: On Wed, 28 Sep 2005, Dvir Volk wrote: here's the situation: i have a file, and i want to open it only when no other process is writing to it. but i don't have control over

Re: How can i tell if another process is writing to a file?

2005-09-28 Thread Yedidyah Bar-David
On Wed, Sep 28, 2005 at 08:05:52PM +0300, guy keren wrote: On Wed, 28 Sep 2005, Yedidyah Bar-David wrote: On Wed, Sep 28, 2005 at 06:34:09PM +0300, guy keren wrote: On Wed, 28 Sep 2005, Dvir Volk wrote: here's the situation: i have a file, and i want to open it only when no

Re: How can i tell if another process is writing to a file?

2005-09-28 Thread guy keren
On Wed, 28 Sep 2005, Muli Ben-Yehuda wrote: On Wed, Sep 28, 2005 at 06:34:09PM +0300, guy keren wrote: On Wed, 28 Sep 2005, Dvir Volk wrote: here's the situation: i have a file, and i want to open it only when no other process is writing to it. but i don't have control over the

Re: How can i tell if another process is writing to a file?

2005-09-28 Thread Muli Ben-Yehuda
On Wed, Sep 28, 2005 at 08:09:38PM +0300, guy keren wrote: as for O_EXCL, it does NOT solve this specific race. in fact, it causes a problem: according to the man pages, it only works with combination of O_CREAT. it looks like O_EXCL doesn't do what its name implies... Indeed. Mea culpa.

Re: How can i tell if another process is writing to a file?

2005-09-28 Thread Adam Morrison
here's the situation: i have a file, and i want to open it only when no other process is writing to it. but i don't have control over the possibly writing process, so i can't do advisory or mandatory locking. basically, i want to treat a file received by scp only after the download is

Re: How can i tell if another process is writing to a file?

2005-09-28 Thread Amos Shapira
On 9/29/05, Dvir Volk [EMAIL PROTECTED] wrote: here's the situation: i have a file, and i want to open it only when no other process is writing to it. but i don't have control over the possibly writing process, so i can't do advisory or mandatory locking. basically, i want to treat a file

Re: How can i tell if another process is writing to a file?

2005-09-28 Thread Dvir Volk
thanks after considering all the options, plus a couple that weren't mentioned here, i think i'll just go with the /tmp solution, and do the copying with rsync+ssh with --temp-dir so from the target directory's point of view, files appear complete at once. you're right, guys, it's the

dnotify (was: Re: How can i tell if another process is writing to a file?)

2005-09-28 Thread guy keren
On Wed, 28 Sep 2005, Yedidyah Bar-David wrote: On Wed, Sep 28, 2005 at 08:05:52PM +0300, guy keren wrote: On Wed, 28 Sep 2005, Yedidyah Bar-David wrote: I waited for one of the experts to say this, but none did. So here I go. I never tried it myself, but there is dnotify and a

Re: dnotify (was: Re: How can i tell if another process is writing to a file?)

2005-09-28 Thread Yedidyah Bar-David
On Thu, Sep 29, 2005 at 04:37:32AM +0300, guy keren wrote: On Wed, 28 Sep 2005, Yedidyah Bar-David wrote: On Wed, Sep 28, 2005 at 08:05:52PM +0300, guy keren wrote: as i understand, dnotify noties that a directory was changed. it does not notify you when a directory is NOT changed (which