Even with strace also it hang,
I am pasting last few lines from "strace cc hell.c".
access("/opt/java/jstudio_ent81/ide/bin/cc", X_OK) = -1 ENOENT (No such file or directory)
access("/opt/java/eclipse/cc", X_OK) = -1 ENOENT (No such file or directory)
access("/usr/kerberos/bin/cc", X_OK) = -1 ENOENT (No such file or directory)
access("/usr/lib/ccache/cc", X_OK) = 0
lstat64("/usr/lib/ccache/cc", {st_mode=S_IFLNK|0777, st_size=15, ...}) = 0
stat64("/usr/lib/ccache/cc", {st_mode=S_IFREG|0755, st_size=40300, ...}) = 0
lstat64("/usr", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
lstat64("/usr/lib", {st_mode=S_IFDIR|0755, st_size=61440, ...}) = 0
lstat64("/usr/lib/ccache", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
lstat64("/usr/lib/ccache/cc", {st_mode=S_IFLNK|0777, st_size=15, ...}) = 0
readlink("/usr/lib/ccache/cc", "/usr/bin/ccache", 4096) = 15
lstat64("/usr", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
lstat64("/usr/bin", {st_mode=S_IFDIR|0755, st_size=69632, ...}) = 0
lstat64("/usr/bin/ccache", {st_mode=S_IFREG|0755, st_size=40300, ...}) = 0
access("/usr/local/bin/cc", X_OK) = -1 ENOENT (No such file or directory)
access("/usr/bin/cc", X_OK) = 0
lstat64("/usr/bin/cc", {st_mode=S_IFLNK|0777, st_size=3, ...}) = 0
stat64("/usr/bin/cc", {st_mode=S_IFREG|0755, st_size=204264, ...}) = 0
lstat64("/usr", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
lstat64("/usr/bin", {st_mode=S_IFDIR|0755, st_size=69632, ...}) = 0
lstat64("/usr/bin/cc", {st_mode=S_IFLNK|0777, st_size=3, ...}) = 0
readlink("/usr/bin/cc", "gcc", 4096) = 3
lstat64("/usr/bin/gcc", {st_mode=S_IFREG|0755, st_size=204264, ...}) = 0
stat64("kk.c", {st_mode=S_IFREG|0644, st_size=73, ...}) = 0
open("/home/shashidhara.n/.ccache/stats", O_RDWR) = 4
fcntl64(4, F_SETLKW, {type=F_WRLCK, whence=SEEK_SET, start=0, len=1}) = ? ERESTARTSYS (To be restarted)
--- SIGWINCH (Window changed) @ 0 (0) ---
fcntl64(4, F_SETLKW, {type=F_WRLCK, whence=SEEK_SET, start=0, len=1} (Last System Call)
--
Shashidhara HN