Making syscall chdir permanent when app ends
I can get syscall chdir (eax=12 / int 0x80) to work correctly but I'd like the directory to remain changed when the app ends. Is there a syscall equivalent to "set current directory" ?
I've read jilliagre's post on the unique nature of chdir but hope I don't need to get involved with the parent shell. This is the applicable section of jilliagre's post: ;---------------- . . . in the old system chdir was an ordinary command; it adjusted the current directory of the (unique) process attached to the terminal. Under the new system, the chdir command correctly changed the current directory of the process created to execute it, but this process promptly terminated and had no effect whatsoever on its parent shell! It was necessary to make chdir a special command, executed internally within the shell. It turns out that several command-like functions have the same property, for example login. ;---------------- Thanks in advance. |
Quote:
The way around it would be something like:
|
Thanks Hko. Now, at least, I won't waste any more time searching for something which doesn't exist.
|
Quote:
Quote:
Each process has its own "current directory". Assuming you find a way to have the parent's current directory "inherited" from its dying child, that would generate a big mess as daemons / process leaders see their current directory more or less randomly changed during their own lifetime. |
Quote:
I wanted it to act the same as if cd home/.mozilla were issued from the command prompt. But the application is a trivial utility and certainly not worth endangering the stability of the o.s. Thanks very much for your time jlliagre. |
All times are GMT -5. The time now is 12:43 AM. |