From: Matthew Mondor Date: Sat, 28 Oct 2006 08:34:21 +0000 (+0000) Subject: Use stderr File directly X-Git-Tag: pgsql-branch-merge~93 X-Git-Url: http://git.pulsar-zone.net/?a=commitdiff_plain;h=beb97ec6dfc65bd09bbc7215257497fc2c6acc27;p=mmondor.git Use stderr File directly --- diff --git a/mmsoftware/js/js-appserv/app/test/main.js b/mmsoftware/js/js-appserv/app/test/main.js index ed3d125..7c013d6 100644 --- a/mmsoftware/js/js-appserv/app/test/main.js +++ b/mmsoftware/js/js-appserv/app/test/main.js @@ -1,4 +1,4 @@ -/* $Id: main.js,v 1.1 2006/08/20 06:58:57 mmondor Exp $ */ +/* $Id: main.js,v 1.2 2006/10/28 08:34:21 mmondor Exp $ */ /* * Copyright (C) 2006, Matthew Mondor @@ -91,12 +91,6 @@ sid_expiration = 30; -/* Set err globally */ -err = new FD(); -err.set(FD.STDERR_FILENO); - - - function file_read(file) { var contents = ''; @@ -113,7 +107,7 @@ function file_read(file) contents += data; } } catch (x) { - err.put(x + "\n"); + stderr.write(x + "\n"); } finally { fd.close(); } @@ -143,7 +137,7 @@ function child_init_hook() /* Set pgc globally */ pgc = PG.connectDb(database); } catch (x) { - err.put(x + "\n"); + stderr.write(x + "\n"); } sid_init(); } @@ -176,14 +170,14 @@ function reject_handler(r, reason) fd = new FD(); fd.binit(r.client_socket, hello_timeout, hello_timeout); } catch (x) { - err.put(x + "\n"); + stderr.write(x + "\n"); } try { o = {result: false, msg: "Rejected", reason: reason}; fd.put(o.toSource() + "\r\n"); } catch (x) { - err.put(x + "\n"); + stderr.write(x + "\n"); } } @@ -222,7 +216,7 @@ function request_handler(r) fd = new FD(); fd.binit(r.client_socket, hello_timeout, hello_timeout); } catch (x) { - err.put(x + "\n"); + stderr.write(x + "\n"); } o = {result: true, msg: "Ready"};