Return-Path: postarch
Received: by postgres.Berkeley.EDU (5.61/1.29)
	id AA04540; Thu, 30 Apr 92 11:12:58 -0700
Message-Id: <9204301812.AA04540@postgres.Berkeley.EDU>
From: postarch (Postgres Mailing Archive)
Subject: Re: System call in C function
To: postgres@postgres.berkeley.edu
Sender: pg_adm@postgres.berkeley.edu
Reply-To: mer@postgres.berkeley.edu
In-Reply-To: Your message of "Mon, 27 Apr 92 13:56:00 PDT."
             <01GJCKWYHH4G9AMMC1@umiami.IR.Miami.EDU> 
Date: Thu, 30 Apr 92 11:12:15 PDT

you write:

> I am trying to execute a system call from withing a C
> function.  I wrote the following C function:
> 
> #include <stdio.h>
> char warning()
> {
>         system("echo hi > /tmp/dog\n");
>         return(1>0);
> }
> 
> The function seems to define and load without any problem.  It also
> appears to have gotten as far as the return line since all tuples
> are returned.  Yet the file "dog" is never created.

I'm running the same function and everything appears to work as expected.
Could it be that you're running the front-end on a remote machine?  If
so then /tmp on the server (where postgres lives) is the place where dog
will be created.


Jeff Meredith
mer@postgres.berkeley.edu
