Thread:

From
ChristophSchmidt
Date:
Hi,
im trying to write a trigger, which opens an ip-connection to a known host.
The single program works, but inside the trigger the trigger dies silently
after the connection is succsessfully opened. (con = 0)
The output with elog of the conection status is the last what is to see.
here the fragment :
 ...
elog (NOTICE, "trigf (fired %s): there are %d tuples in : %s", when,i,stmp);
        soaddr.sin_family = AF_INET;
        soaddr.sin_port = htons(1111);
        soaddr.sin_addr.s_addr = inet_addr("192.168.001.199");
        con = connect(ipFD, &soaddr,sizeof(soaddr));
        elog(ERROR,"con = %d\n",con);
this is from psql not to see        elog(NOTICE,"send \n");
send(ipFD,nachricht,strlen(nachricht)+1,0x1);
.....

cs