OMG. You're absolutely right. I forgot because I use to program in c++, and I use 'new' instead of 'malloc' (with 'new' you have to specify the type, so the size is implicit). Thanks a lot, that was...
Type: Posts; User: icebabe
OMG. You're absolutely right. I forgot because I use to program in c++, and I use 'new' instead of 'malloc' (with 'new' you have to specify the type, so the size is implicit). Thanks a lot, that was...
Hi, everybody. I need help with this: I'm writing a program that reads something like <path [argument1] [argument2] [...][&]> from the standard input and then tries to execute the program 'path' with...
It requires a really long explanation... It's just that I can avoid using the file in question if I approach the exercise in a really different way. It doesn't have anything to do with my original...
Thanks! Although I've thought of another way to solve the exercise without doing the file thingy. Thanks a lot anyway!
I totally agree. :rolleyes:
I've already thought about it but unfortunately I'm not allowed to use any other file (it's one of the restrictions of the exercise). Anyway, I think I can do it another way. Thanks!
Hi everybody! I need to write at the beginning of a file that already has a content and I want to insert in it without overwriting what it already contains. Do you know any function to do this? I'm...
Ok, thanks, anyway.
Thanks a lot! I really appreciate it!
That's what I'm doing. I'm using a bitwise OR here: open(FIFOSERVS, O_WRONLY | O_NONBLOCK), that is, at the only place where I'm using more than 1 option.
And, believe me, I've consulted the man...
And this...
//open FIFOSERVE
if((fd_fifoserve = open(FIFOSERVE, O_RDWR)) < 0){
perror("error al abrir el FIFO de entrada al servidor (open)");
exit(-1);
}
//open FIFOSERVS
Another thing: if I don't wanna get blocked when I do a 'read' I must use the option O_NONBLOCK when opening the FIFO, right? What if sometimes I want it to get blocked and sometimes I don't (in...
Hi everybody! I'm new at working with FIFO files and so I'm a bit confused about some things:
- First, the manual says a FIFO must be opened on both ends in order to write in (or read from) it....
Ok, thanks a lot (I was wondering if there was a function that did that but apparently there isn't any). Bye!
Ok, so do you know any way of writing SIZEMAX copies of 'letra' without having to storage it previously into a variable? Thanx.
But the reason I create a temporary file to storage the message is that it's too big to storage it in a variable (you can storage it in a variable, of course, but it will waste a lot of memory), so...
Hi everybody! I'm having a silly though extremely annoying problem when using fwrite. What I'm trying to do is to calculate a random size for the message I'm about to write (although this size is...