[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

unthreaded application?

Title: unthreaded application?


I have an application that needs to run its own version of some system-calls (fork, wait, kill, etc.): the source-code therefore includes a small assembly-code module to do that, calling the kernel directly using "int 0x80" and bypassing the libraries.

The application is not threaded, but since a new glibc library was installed, it occasionally gets stuck.  Using STRACE, I found that it is stuck on the "futex()" system-call, which I understand is used for threading.

I have no idea why "futex()" was called in the first place because the application uses no threads, but it seems that futex is waiting for some value in memory to change, which was probably supposed to be set by one of the bypassed system-calls.

1. Is there a way to tell GLIBC that my application is not threaded, so it does not attempt to use threading system-calls (perhaps a compilation flag, or an environment variable)?

2. Is there anything wrong for a program to issue system-calls directly?

3. Is there a correct way to bypass such unwanted threading system-calls (for example by providing dummy routines that return 0 or -1/ENOSYS)?

Thanks in advance!

Reply to: