WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] Fix --output-pid (broken when we fixed --pid-file).

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] Fix --output-pid (broken when we fixed --pid-file).
From: Xen patchbot -unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Fri, 12 Aug 2005 03:20:10 -0400
Delivery-date: Fri, 12 Aug 2005 07:20:40 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User kaf24@xxxxxxxxxxxxxxxxxxxx
# Node ID 7dc610b0d1bad1e85e06ea6b4ca5026d0f7218fd
# Parent  822566f5cfddce3b641b5a1a119dfd592ec69158
Fix --output-pid (broken when we fixed --pid-file).
Thanks to Jerone Young for spotting this.

Signed-off-by: Rusty Russell <rusty@xxxxxxxxxxxxxxx>

diff -r 822566f5cfdd -r 7dc610b0d1ba tools/xenstore/xenstored_core.c
--- a/tools/xenstore/xenstored_core.c   Thu Aug 11 22:18:27 2005
+++ b/tools/xenstore/xenstored_core.c   Fri Aug 12 07:21:45 2005
@@ -1587,7 +1587,7 @@
 
 int main(int argc, char *argv[])
 {
-       int opt, *sock, *ro_sock, event_fd, max, tmpout;
+       int opt, *sock, *ro_sock, event_fd, max;
        struct sockaddr_un addr;
        fd_set inset, outset;
        bool dofork = true;
@@ -1673,9 +1673,8 @@
        restore_existing_connections();
 
        if (outputpid) {
-               char buffer[20];
-               sprintf(buffer, "%i\n", getpid());
-               write(tmpout, buffer, strlen(buffer));
+               printf("%i\n", getpid());
+               fflush(stdout);
        }
 
        /* close stdin/stdout now we're ready to accept connections */

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] Fix --output-pid (broken when we fixed --pid-file)., Xen patchbot -unstable <=