11-15-2007
thanks you are right!
Also the permissions depends on the umask... the umask of my system is set to 0022... I have notice that a few minutes ago......
regards
jorge
10 More Discussions You Might Find Interesting
1. Programming
What is the difference between int** func() and int*& func(). Can you please explain it with suitable example.
Thanks,
Devesh. (1 Reply)
Discussion started by: devesh
1 Replies
2. Red Hat
Hello everey one,
here i am attempting to compile a c++ project .it's throughing the following errors.
my machine details are as follows:
Linux chmclozr0119 2.6.18-53.el5 #1 SMP Wed Oct 10 16:34:19 EDT 2007 x86_64 x86_64 x86_64 GNU/Linux
errors:
=====
Generating... (0 Replies)
Discussion started by: mannam srinivas
0 Replies
3. Programming
Hello,
After, I stat() a file, how can I read the various permissions flags from the st_mode variable which is of type mode_t? I would like to do something like:
struct stat *perms;
int res = stat(filename, perms);
if(perms->st.mode == S_IROTH) do something;
but I know that is the wrong... (2 Replies)
Discussion started by: pallak7
2 Replies
4. Programming
hello everybody!
i have aproblem! i dont know how to concatenate const char* with char
const char *buffer;
char *b;
sprintf(b,"result.txt");
strcat(buffer,b);
thanx in advance (4 Replies)
Discussion started by: nicos
4 Replies
5. Programming
Hi,
I wrote a simple code in C++ converting from UpperToLower case characters. However, my compiler gives me a warning:
"warning: conversion to 'char' from 'int' may alter its value".
Any tips?
I would like to stress, I don't want to load my string into char array.
int ToLower(string... (4 Replies)
Discussion started by: kajolo
4 Replies
6. Programming
Hi,
from the manual
listen(2): listen for connections on socket - Linux man page
It has a parameter called backlog and it limits the maximum length of queue of pending list.
If I set backlog to 128, is it means no more than 128 packets can be handled by server?
If I have three... (3 Replies)
Discussion started by: sehang
3 Replies
7. Programming
Hi,
Can any one tell me why my following program is crashing?
#include <iostream>
using namespace std;
class CA {
public:
const static int i;
};
const int CA::i = 10;
int main() {
int* pi = const_cast<int*>(&CA::i);
*pi = 9;
cout << CA::i << endl;
} (6 Replies)
Discussion started by: royalibrahim
6 Replies
8. Programming
Compiling xpp (The X Printing Panel) on SL6 (RHEL6 essentially):
xpp.cxx: In constructor ‘printFiles::printFiles(int, char**, int&)’:
xpp.cxx:200: error: invalid conversion from ‘const char*’ to ‘char*’
The same error with all c++ constructors - gcc 4.4.4.
If anyone can throw any light on... (8 Replies)
Discussion started by: GSO
8 Replies
9. Programming
My question is simple: When should I use a long, int, char, unsigned/signed variables??
When I declare a variable "unsigned;" what did I do it???
Why would I delcare an integer "long" or "short" ( unsigned or signed)??
Any examples of when things like "unsigned", "long", "short" etc...... (6 Replies)
Discussion started by: cpp_beginner
6 Replies
10. Programming
As this function returns the address of the string corressponding to the errno value provided to it. Can someone please let me know where, in the memory, it could be (on freeBSD).
The MAN page tells under the BUG section that "For unknown error numbers, the strerror() function will return its... (5 Replies)
Discussion started by: Praveen_218
5 Replies
LEARN ABOUT REDHAT
mkfifo
MKFIFO(3) Linux Programmer's Manual MKFIFO(3)
NAME
mkfifo - make a FIFO special file (a named pipe)
SYNOPSIS
#include <sys/types.h>
#include <sys/stat.h>
int mkfifo(const char *pathname, mode_t mode);
DESCRIPTION
mkfifo makes a FIFO special file with name pathname. mode specifies the FIFO's permissions. It is modified by the process's umask in the
usual way: the permissions of the created file are (mode & ~umask).
A FIFO special file is similar to a pipe, except that it is created in a different way. Instead of being an anonymous communications chan-
nel, a FIFO special file is entered into the file system by calling mkfifo.
Once you have created a FIFO special file in this way, any process can open it for reading or writing, in the same way as an ordinary file.
However, it has to be open at both ends simultaneously before you can proceed to do any input or output operations on it. Opening a FIFO
for reading normally blocks until some other process opens the same FIFO for writing, and vice versa. See fifo(4) for non-blocking handling
of FIFO special files.
RETURN VALUE
The normal, successful return value from mkfifo is 0. In the case of an error, -1 is returned (in which case, errno is set appropriately).
ERRORS
EACCES One of the directories in pathname did not allow search (execute) permission.
EEXIST pathname already exists.
ENAMETOOLONG
Either the total length of pathname is greater than PATH_MAX, or an individual file name component has a length greater than
NAME_MAX. In the GNU system, there is no imposed limit on overall file name length, but some file systems may place limits on the
length of a component.
ENOENT A directory component in pathname does not exist or is a dangling symbolic link.
ENOSPC The directory or filesystem has no room for the new file.
ENOTDIR
A component used as a directory in pathname is not, in fact, a directory.
EROFS pathname refers to a read-only filesystem.
CONFORMING TO
POSIX.1
SEE ALSO
mkfifo(1), read(2), write(2), open(2), close(2), stat(2), umask(2), fifo(4)
Linux 1.2.13 1995-09-03 MKFIFO(3)