I have shared library (created by myself) that implements some file operations:
Also I have two programs (pr1 and pr2) that use that library and they call lib_func(): lib_func("/dir/dir/file");
Here is the mystery:
- if I run pr1 from command line, lib_func() is called successfully and file is accessed as required;
- if I run pr2 as daemon, lib_func() is called but fopen() fails with ERRNO=2 (No such file or directory).
How can I fix it to run with pr2?
What I have checked so far:
1. I start pr1 and pr2 strictly in different times (no simultaneous running).
2. File in question exists (I can view it, copy it, delete it from shell).
3. Path to file is absolute.
4. No compile warnings/errors.
5. pr2 is in userspace.
6. Both processes are running from root user and have rights for the file access (777).
7. SELinux is in permissive mode (no effect on system operation).
8. No other process is blocking the file.
Hello,
I have a problem here, I want to write a function called"myfopen()" instead of "fopen()"
for writing this function I must not use the <stdio.h> library,
Can you help me?
thanks a lot (2 Replies)
I was testing Fedora 16 mostly to check the new features. One thing that caught my eye as a systems admin is the systemd which is incorporated in Fedora for quite a while now.
From the first look of it, this appears more close to Solaris's SMF. With parallelization capabilities, advanced... (0 Replies)
Hi,
In my linux box I have installed /boot partition with 100MB. I have done compile for a newer kernel. The both kernels are required to me. Finally /boot partition has using 100%. I need to resize the /boot. Any body give the solution how to do resize the /boot partition without dusturbing the... (2 Replies)
Hello
I am using linux machine. I need Icon tray in this. "Icon Tray" contains all the icons which we open in the workspace.
As such, these icons appear at the bottom (similar to windows i.e.when we open internetexplorer, Word, XLs, these icons appear in the bottom)
I have to open so many... (3 Replies)
I always assumed the fopen/freopen is very costly, so when I needed to work with many files within on process I spent extra time to implement a list of FILE * pointers to avoid extra open/reopen but it did not produced any better results.
Here is a task at hand - there is a huge stream of data... (4 Replies)
This code works fine when I use a command line argument for fopen()'s parameter, but when I change it to a filename, the program freezes upon compilation. input.txt is definitely there, so I can't figure it out. Thanks.
#include <stdlib.h>
#include <stdio.h>
#include <ctype.h>
int... (3 Replies)
what is the difference between
fopen and open
fread and read
fwrite and write
open and create
why this much of functions for the i/o when everything does the same...?
What is their major difference?
In which case, which is the best to use.
:confused:'ed Collins (2 Replies)
Hi All,
Today I was logged in with my username (non root) on one of our Solaris 9 boxes and and typed "su - appserver".
The strange thing is that I was not prompted for appserver's password and it allowed me to become "appserver" even if I am not root.
Can anyone suggest where to look for... (5 Replies)
hi
I am starting with MPI programming, can anyone suggest me some books for MPI or some good online tutorials which will cover both theory and programming.
thanks (0 Replies)
Hi guys!
i have spent a whole day browsing and i couldn''t find a provider distributing free linux. I am a beginner and am looking for one that can run on Windows 98SE.
Would deeply appreciate if you guys can help me. I went into "mirrors" site and was given lots of directory to d/l but i... (7 Replies)