You may be able to make use of
select, or if that doesn't work for you then you may have to issue a special sysopen call with certain bits set in the mode parameter but alas I cannot remember what they are at the moment.
UPDATE:
I found this node which explains what the mode should be for the sysopen.
metadoktor
"The doktor is in."