Re: chdir on linux does not work
Frank Kotler <[email protected]> Wed, 24 May 2006 02:49:24 -0400
| Newsgroups | org.kernel.vger.linux-assembly |
|---|---|
| Message-ID | <[email protected]> |
Timo Lindfors wrote: ... > Remember that chdir affects only the process that calls chdir. I thought Noprianto's problem was the lack of a terminating zero after "/bin"... didn't help, but I still think it's a bug waiting to byte. Adding a call to sys_getcwd (__NR_ 183) (why is this man 3, not man 2 ???) proves that, sure enough, it *does* work... but we change back on exit... as you say... > You > can't e.g. write a replacement for shell's builtin "cd" command that > way. Okay, how *would* we do that? I know! I'll check "asmutils"! Hmmm... no chdir in asmutils... This is apparently harder than it looks! Good Question! Best, Frank