Resource unavailable messages.

bridged with qdn.public.qnxrtp.applications
Post Reply
Geoff

Resource unavailable messages.

Post by Geoff » Fri Nov 29, 2002 7:02 am

Often I get this message whan I attempt to link (create) an executable
file of a process that happens to be currently running. I have to shut
the process down before I can create a new one. This seems to be a
little strange. One clue is that the process starts up in the background
(it is a device driver using the io-char DDK). Also, it doesn't happen
all the time, but often enough to warrant a query.

Geoff Roberts

Xiaodan Tang

Re: Resource unavailable messages.

Post by Xiaodan Tang » Fri Nov 29, 2002 2:18 pm

Geoff <geoff@rtts.com.au> wrote in message
news:3DE710E9.FCF9DAAE@rtts.com.au...
Often I get this message whan I attempt to link (create) an executable
file of a process that happens to be currently running. I have to shut
the process down before I can create a new one. This seems to be a
little strange. One clue is that the process starts up in the background
(it is a device driver using the io-char DDK). Also, it doesn't happen
all the time, but often enough to warrant a query.
Instead of shut the process down, you can "rm" the one first, and then
create it.

-xtang

Geoff

Re: Resource unavailable messages.

Post by Geoff » Fri Nov 29, 2002 8:09 pm

Yes, I discovered this. But why should I have to do that in the first
place? Why should the linker care that the file it is creating already
has an instance executing and therefore not be able write a new one?
Seems a little odd to me.

Geoff.

Xiaodan Tang wrote:
Geoff <geoff@rtts.com.au> wrote in message
news:3DE710E9.FCF9DAAE@rtts.com.au...
Often I get this message whan I attempt to link (create) an executable
file of a process that happens to be currently running. I have to shut
the process down before I can create a new one. This seems to be a
little strange. One clue is that the process starts up in the background
(it is a device driver using the io-char DDK). Also, it doesn't happen
all the time, but often enough to warrant a query.

Instead of shut the process down, you can "rm" the one first, and then
create it.

-xtang

Colin Burgess

Re: Resource unavailable messages.

Post by Colin Burgess » Mon Dec 02, 2002 3:27 pm

It's because procnto has mmap()ed the file in, and has a SH_DENYWR lock
on the executable.

Geoff <geoff@rtts.com.au> wrote:
Yes, I discovered this. But why should I have to do that in the first
place? Why should the linker care that the file it is creating already
has an instance executing and therefore not be able write a new one?
Seems a little odd to me.

Geoff.

Xiaodan Tang wrote:

Geoff <geoff@rtts.com.au> wrote in message
news:3DE710E9.FCF9DAAE@rtts.com.au...
Often I get this message whan I attempt to link (create) an executable
file of a process that happens to be currently running. I have to shut
the process down before I can create a new one. This seems to be a
little strange. One clue is that the process starts up in the background
(it is a device driver using the io-char DDK). Also, it doesn't happen
all the time, but often enough to warrant a query.

Instead of shut the process down, you can "rm" the one first, and then
create it.

-xtang
--
cburgess@qnx.com

Bill Caroselli (Q-TPS)

Re: Resource unavailable messages.

Post by Bill Caroselli (Q-TPS) » Tue Dec 03, 2002 6:08 pm

"Xiaodan Tang" <xtang@qnx.com> wrote in message
news:as7ss5$fk4$1@nntp.qnx.com...
Instead of shut the process down, you can "rm" the one first, and then
create it.

-xtang

That brings up an interesting question. In QNX4 a file could be unlinked
while some process had it open. The process could continue to do IO to the
file even though the directory entry had been removed.

Does this still occur in QNX6?

David Gibbs

Re: Resource unavailable messages.

Post by David Gibbs » Tue Dec 03, 2002 7:58 pm

"Bill Caroselli \(Q-TPS\)" <QTPS@earthlink.net> wrote:
"Xiaodan Tang" <xtang@qnx.com> wrote in message
news:as7ss5$fk4$1@nntp.qnx.com...

Instead of shut the process down, you can "rm" the one first, and then
create it.

-xtang

That brings up an interesting question. In QNX4 a file could be unlinked
while some process had it open. The process could continue to do IO to the
file even though the directory entry had been removed.

Does this still occur in QNX6?
Yes.

-David
--
QNX Training Services
http://www.qnx.com/support/training/
Please followup in this newsgroup if you have further questions.

Post Reply

Return to “qdn.public.qnxrtp.applications”