![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Programmer
Join Date: Aug 2005
Posts: 66
Rep Power: 0
![]() |
flushing I/O?
Hi all.
I have a little bash script that simply outputs "foo" into a file under the /tmp dir !#/bin/bash echo foo &> /tmp/foo.txt exit $? A little thing about this code is that I'm executing it thought "C"'s "execl" command. It works fine the first time...but then hangs the second....if I kill the process and leave it for a while, it will work again...once...and then hang until I kill. I think that there is a combat for resources here and that either the bash script or the C script is tieing up the I/O Stream....I have reason to believe it's the bash...although I've been wrong many...many times before. ^_^ Long story short, is there any way to "flush" out the I/O stream in bash? Thanks in advance! ^_^
__________________
Isn't that just the way life goes? If it's worth doing, it's NP-Hard. Todd Wareham - Memorial University of Newfoundland |
|
|
|
|
|
#2 |
|
Programmer
Join Date: Aug 2005
Posts: 66
Rep Power: 0
![]() |
Never mind...found it after. The command is sync.
Works now for SOME users....there still seems to be an I/O deadlock happening for some. I'll have to go though the rest of my code and make sure everything is fully flushed. Thanks! ![]()
__________________
Isn't that just the way life goes? If it's worth doing, it's NP-Hard. Todd Wareham - Memorial University of Newfoundland |
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| flushing input buffer | sharadpro | Java | 3 | May 25th, 2006 5:10 PM |
| Flushing out an array (solved) | Navid | C | 5 | Jun 28th, 2005 11:35 AM |