Thanks for your responses. I tried all these possibilities unsuccessfully Code: int result = _spawnlp(_P_NOWAIT, "/bin/sh" , "/bin/sh", "-c", "/home/dims/strjava", NULL ); int result = _spawnlp(_P_NOWAIT, "/bin/sh" , "sh", "-c", "/home/dims/strjava", NULL ); int result = _execl("/bin/sh" , "/bin/sh", "-c", "/home/dims/strjava", NULL ); int result = _execl("/bin/sh" , "sh", "-c", "/home/dims/strjava", NULL ); Any other idea?