how to detect if a file operation is currently done on a file on linux -


how can detect if file open , file operation being done on process on linux using c or c++? know lsof lists open files dont how gets information.

thx

i'm not sure lsof working this, way implement this:

  • get process' open files looknig /proc/$pid/fd/ files.

  • look any other process' /proc/$pid/fd/ in order see reading same files.


Comments

Popular posts from this blog

php - What is the difference between $_SERVER['PATH_INFO'] and $_SERVER['ORIG_PATH_INFO']? -

fortran - Function return type mismatch -

queue - mq_receive: message too long -