-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Cristea Bogdan wrote:
> I mean the directory external to the process. I have the same C++
> program, with different configurations which I compile and launch from
> different directories in order to save the results in different
> places. I launch the program with nohup, I can see that there is a
> process running in the background, but I can't figure out from which
> directory it was launched.
> 
> On Nov 14, 2007 11:25 AM, G T Smith
> <[EMAIL PROTECTED]> wrote:
> Cristea Bogdan wrote:
>>>> Is there a way to find from which directory a process was launched?
>>>>
> In what context, within the process or external to the process?
> 

As others have indicated not an easy one. If the output files are held
open I suppose one could backtrack the open files to the using process
using lsof.

Personally for this kind of usage I would modify the code either to drop
a tag file of some sort or have the working directory defined in the
command line so you can hunt down the info via ps.


- --
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>

- --
==============================================================================
I have always wished that my computer would be as easy to use as my
telephone.
My wish has come true. I no longer know how to use my telephone.

Bjarne Stroustrup
==============================================================================
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (GNU/Linux)
Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org

iD8DBQFHOwj3asN0sSnLmgIRAhB7AKDMFZ0mskqIJmUdCCi4M/AqGrEh0ACfZPSn
eReN6j40WiP2k2vCYGvzClE=
=Yfjr
-----END PGP SIGNATURE-----
-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to