open locks up ...

Hi,

there must be a problem with the open call or the file system manage.

A statement like fd =open("/dev/xyzdrc", O_RDONLY); doesn’t
terminate and locks up the calling task if xyzdrv doesn’t exist.

Any workaround ??

Armin

PS.: here is an example program …

#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>

void main(void)
{
int fd;

fd = open("/dev/XYZDRV", O_RDONLY); // XYZDRV isn’t created
}

“Armin Steinhoff” <a-steinhoff@web_.de> wrote in message
news:3BF2BA15.1070609@web_.de…

Hi,

there must be a problem with the open call or the file system manage.

A statement like fd =open("/dev/xyzdrc", O_RDONLY); doesn’t
terminate and locks up the calling task if xyzdrv doesn’t exist.

Any workaround ??

This works fine for me. (I tried you sample). Is it possible you have

a resource manager taking over /dev that isn’t replying?
Check the pid of the process it’s blocked on.



Armin

PS.: here is an example program …

#include <sys/types.h
#include <sys/stat.h
#include <fcntl.h

void main(void)

Note: void main(void) isn’t standard C (89/99). The return value should
always be int!
With warning on, gcc will complaint about this.

{
int fd;

fd = open("/dev/XYZDRV", O_RDONLY); // XYZDRV isn’t created
}

Mario Charest wrote:

“Armin Steinhoff” <a-steinhoff@web_.de> wrote in message
news:3BF2BA15.1070609@web_.de…

Hi,

there must be a problem with the open call or the file system manage.

A statement like fd =open("/dev/xyzdrc", O_RDONLY); doesn’t
terminate and locks up the calling task if xyzdrv doesn’t exist.

Any workaround ??


This works fine for me. (I tried you sample). Is it possible you have
a resource manager taking over /dev that isn’t replying?
Check the pid of the process it’s blocked on.

Did it :slight_smile: and found the blocked resource manager which was blocked in
its starting phase (wrong start parameter …)

Thanks … it was simply a false alarm :slight_smile:

Armin



Armin

PS.: here is an example program …

#include <sys/types.h
#include <sys/stat.h
#include <fcntl.h

void main(void)


Note: void main(void) isn’t standard C (89/99). The return value should
always be int!
With warning on, gcc will complaint about this.


{
int fd;

fd = open("/dev/XYZDRV", O_RDONLY); // XYZDRV isn’t created
}
\