You could try to open the file for appending. If the open fails then either the file can't be created/opened due to permissions problems (or a bad file name or whatever) or it is locked (maybe depending on the OS). Once opened you can use flock to attempt to grab an exclusive lock (LOCK_EX) and again if that fails it is probably already locked.
In reply to Re: file used by process
by GrandFather
in thread file used by process
by farhan
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |