From: Enrico Scholz Date: Tue, 30 Mar 2004 16:04:36 +0000 (+0000) Subject: obsoleted by vshelper-sync X-Git-Tag: VERSION_0_10~182 X-Git-Url: http://git.linux-vserver.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=840188ce95fea7bb98ebd12a70f64ee0ef49f5cf;p=util-vserver.git obsoleted by vshelper-sync git-svn-id: http://svn.linux-vserver.org/svn/util-vserver/trunk@1393 94cd875c-1c1d-0410-91d2-eb244daf1a30 --- diff --git a/util-vserver/src/pipe-sync.c b/util-vserver/src/pipe-sync.c deleted file mode 100644 index acc84a8..0000000 --- a/util-vserver/src/pipe-sync.c +++ /dev/null @@ -1,72 +0,0 @@ -// $Id$ --*- c -*-- - -// Copyright (C) 2003 Enrico Scholz -// -// This program is free software; you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation; version 2 of the License. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - - -#ifdef HAVE_CONFIG_H -# include -#endif - -#include "util.h" - -#include -#include -#include -#include -#include - -#define ENSC_WRAPPERS_UNISTD 1 -#include "wrappers.h" - -int wrapper_exit_code = 2; - -static void -sigHandler(int UNUSED sig) -{ -} - -int main(int argc, char *argv[]) -{ - int fd; - char buf[1]; - bool res; - bool is_root; - - if (argc!=4) { - WRITE_MSG(2, "Usage: minit-sync \n"); - return 1; - } - - is_root = strcmp(argv[1], "/")==0; - - if (!is_root) { - Echroot(argv[1]); - Echdir("/"); - } - - signal(SIGALRM, sigHandler); - alarm(atoi(argv[3])); - - res = ((fd=open(argv[2], O_RDONLY, 0))!=-1 && - read(fd, buf, sizeof buf)!=-1); - - if (fd!=-1) Eclose(fd); - - if (!is_root) - Eunlink(argv[2]); - - return res ? 0 : 1; -}