[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Tinycc-devel] I'm writing a Chinese article introducing TCC ...
From: |
Damian M Gryski |
Subject: |
Re: [Tinycc-devel] I'm writing a Chinese article introducing TCC ... |
Date: |
Sun, 8 Jun 2003 11:36:33 -0400 |
User-agent: |
Mutt/1.5.4i |
On Sun, 08 Jun 2003, ZHAO Wei wrote:
> Damian M Gryski wrote:
> >
> > <address@hidden> cat hello.c |tcc -run /dev/stdin
> > hello, world
> > <address@hidden>
>
> Wow! That's great! But is there such a device in Linux? I was
> writing this article for a Linux magazine. Maybe there is a
> counterpart under /proc ?
This was on a Debian GNU/Linux system.
On my system, /dev/stdin is a symlink to /dev/fd/0 . /dev/fd/ is
a symlink to /proc/self/fd .
I guess I thought /dev/stdin was fairly portable (across Linux
distributions, anyway), but to be *fully* portable, use:
/proc/self/fd/0 as the filename, since that's guaranteed to exist.
--
Damian Gryski | "There is a crack, a crack in everything.
address@hidden | That's how the light gets in."
gnu / geek / juggler / coder / compsci / crypto / security
pgp43CHQr6hro.pgp
Description: PGP signature