Democratic Underground Latest Greatest Lobby Journals Search Options Help Login
Google

Warning!!!! unlink means remove the file/syslink in C

Printer-friendly format Printer-friendly format
Printer-friendly format Email this thread to a friend
Printer-friendly format Bookmark this thread
This topic is archived.
Home » Discuss » The DU Lounge Donate to DU
 
TrogL Donating Member (1000+ posts) Send PM | Profile | Ignore Tue Sep-21-04 01:43 PM
Original message
Warning!!!! unlink means remove the file/syslink in C
Just thought you'd like to know.

Two hours and three reboots wasted.
Printer Friendly | Permalink |  | Top
Book Lover Donating Member (1000+ posts) Send PM | Profile | Ignore Tue Sep-21-04 01:46 PM
Response to Original message
1. Now, now, it's not wasted
Now you'll know what to do next time. When you don;t get what you want, you get experience. I'd say for 2 hours of computer work, I'd award you about 6,500 experience points. How close are you to your next level?
Printer Friendly | Permalink |  | Top
 
TrogL Donating Member (1000+ posts) Send PM | Profile | Ignore Tue Sep-21-04 01:49 PM
Response to Reply #1
3. that part's mostly written already
life would be easier if I knew how to read in something from a process (eg. wc)
Printer Friendly | Permalink |  | Top
 
Commie Pinko Dirtbag Donating Member (1000+ posts) Send PM | Profile | Ignore Tue Sep-21-04 02:01 PM
Response to Reply #3
4. You can open a process and read it as if it was a file
Edited on Tue Sep-21-04 02:02 PM by JCCyC
Damned if I know how, though. Let me make a quick search...

Maybe this will help: http://www.cs.utah.edu/dept/old/texinfo/glibc-manual-0.02/library_14.html

I suppose you could, in the "writing" process, call a system() on the process you want to read, like

sprintf(cmdline, sizeof(cmdline), "wc -l blahblah >&%d", mypipe<1>); // <== Should be square brackets after mypipe
system(cmdline);
exit(0);

DISCLAIMER: Totally untested. I just pulled this out of my ass 30 seconds ago. Use at your own risk.
Printer Friendly | Permalink |  | Top
 
DS1 Donating Member (1000+ posts) Send PM | Profile | Ignore Tue Sep-21-04 01:48 PM
Response to Original message
2. beep beep beep, and I was like.... uh?
Printer Friendly | Permalink |  | Top
 
DU AdBot (1000+ posts) Click to send private message to this author Click to view 
this author's profile Click to add 
this author to your buddy list Click to add 
this author to your Ignore list Wed May 01st 2024, 10:14 PM
Response to Original message
Advertisements [?]
 Top

Home » Discuss » The DU Lounge Donate to DU

Powered by DCForum+ Version 1.1 Copyright 1997-2002 DCScripts.com
Software has been extensively modified by the DU administrators


Important Notices: By participating on this discussion board, visitors agree to abide by the rules outlined on our Rules page. Messages posted on the Democratic Underground Discussion Forums are the opinions of the individuals who post them, and do not necessarily represent the opinions of Democratic Underground, LLC.

Home  |  Discussion Forums  |  Journals |  Store  |  Donate

About DU  |  Contact Us  |  Privacy Policy

Got a message for Democratic Underground? Click here to send us a message.

© 2001 - 2011 Democratic Underground, LLC