Re: Any clues to this!

James Morris (jmorris@unix.tm)
Sat, 07 Feb 1998 10:40:06 +1100


Suman_Saraf wrote:

> [suman@linux]Fri Feb 6 14:21:33 [~]:~$gcc -o cd cd.c
> [suman@linux]Fri Feb 6 14:21:39 [~]:~$cd
> [suman@linux]Fri Feb 6 14:21:41 [~]:~$gcc cd.c
> [suman@linux]Fri Feb 6 14:21:46 [~]:~$a.out
> Segmentation fault (core dumped)
...
>
> Why does this happen ? Core dump in one case due to bus error and no
> error in one ??

The first time, 'cd' is executed as a shell built-in, and as you are in
your home directory, nothing happens.

The second time, a.out is executed (do you have a . in your path ?).

- James.

--
James Morris
<jmorris@unix.tm>
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu