open file stream problem


 
Thread Tools Search this Thread
Top Forums Programming open file stream problem
# 1  
Old 10-02-2004
open file stream problem

I have faced a problem that I use 2 file streams in a function and try to fopen() both files. Then I can't get the file descriptor. But if I just use 1 file stream and 1 fopen(), then i can get the file descriptor. Does anybody know why this happens? Thanks in advance.

Code:
toFileStream=fdopen(localFileDes,"a+")
toFileStream=fopen(fromFile,"r+")

# 2  
Old 10-02-2004
Driver,

my problem is that i can't open 2 file stream in a function because there will be always runtime error. Can you show me the code that you can do that? Thanks.
# 3  
Old 10-03-2004
problem solved again. ~~
thx
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Windows & DOS: Issues & Discussions

Play STRG - E-Viewer Recorded Stream file

I have got a .strg file, which I cannot open. I tried NMS Player from Novus, but It can't handle STRG files. How can I play these recordings? (1 Reply)
Discussion started by: kovacsdev
1 Replies

2. Shell Programming and Scripting

Wget for downloading a public file (stream) as mp4

I need a hint for using wget for getting a free content from a TV station that is streaming its material for a while until it appears on any video platform, that means no use of illegal methods, because it is on air, recently published and available. But reading the manual for wget I tried the... (5 Replies)
Discussion started by: 1in10
5 Replies

3. Shell Programming and Scripting

Creating a file from input stream

Hi, Need some help with creating a file from input steam. Meaning from following command myfunc should be able to store the input stream to a file. echo a b c | myfunc The file thus created should have - a b c Here's what I've tried in myfunc() but didn't help - myfunc() { cat... (3 Replies)
Discussion started by: nexional
3 Replies

4. UNIX for Dummies Questions & Answers

What is an (application/octet-stream) file?

I'm trying to learn as much about GRUB as I can and it's stages are stored in these types of files. Any info or search terms is appreciated!:wall: (5 Replies)
Discussion started by: theKbStockpiler
5 Replies

5. Shell Programming and Scripting

Removing all lines prior to the last pattern in a file/stream

Hi all, I didn't find anything that specifically answers this after searching for a bit, so please forgive me if this has been covered before. I'm looking to delete all lines prior to the last occurrence of a string in a file or stream from within a shell script (bash.) A bit of... (4 Replies)
Discussion started by: LivinFree
4 Replies

6. Shell Programming and Scripting

Stream all log files into one file

Here is what I have. 1 main program and it calls several child programs. Each child has its own log file. I want all child logs also to be appended to the main.log so that I have a single log file. I also need individual child logfiles in tact for debug purposes. Need to be able to tail one log... (4 Replies)
Discussion started by: myjunk1
4 Replies

7. Red Hat

cannot set user id: Resource temporarily unavailable (not open file/open process related)

First post, sorry to be a bother but this one has been dogging me. I have a process user (java application server) that trips a resource limit every couple weeks and need help finding what limit we're hitting. First, this is what's running: This is the error when jobs are run or the... (0 Replies)
Discussion started by: Katahdin
0 Replies

8. Shell Programming and Scripting

[Video stream] network stream recording with mplayer

Hi I used this command: mplayer http://host/axis-cgi/mjpg/video.cgi -user root -passwd root \ -cache 1024 -fps 25.0 -nosound -vc ffh264 \ -demuxer 3 -dumpstream -dumpfile output.avi It's ok but... Video Playing is very fast! Why? Is it a synch problem? What parameter I have to use for... (1 Reply)
Discussion started by: takeo.kikuta
1 Replies

9. Solaris

Pla help - urgent-netstat error--- cant open mib stream

Hi, When i type netstat command as normal user it shows following error $ netstat arp open: Permission denied can't open mib stream I can execute the command as root user.. Pls reply at the earliest (1 Reply)
Discussion started by: vadivukumar
1 Replies

10. Programming

File I/O Stream

Hi All, I am trying to read data from two files and then compare them and only print the records on the screen that have a same ID.i.e TAGNO =CUSTOMERNO For Eg My Input Files are (a) Transaction (b) Customer detail The data in file a is like: TagNo Date Time Station... (0 Replies)
Discussion started by: rooh
0 Replies
Login or Register to Ask a Question