All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jorge Opaso Pazos <jopaso@trofeospazos.com>
To: linux-c-programming@vger.kernel.org
Subject: Re: Question!
Date: Thu, 04 Sep 2003 12:04:43 -0400	[thread overview]
Message-ID: <3F57629B.2000004@trofeospazos.com> (raw)
In-Reply-To: <000001c372eb$9ee69b20$0b04a8c0@aca.org.ar>

Mariano Moreyra wrote:
> Hola!
> Te mando la seccion del programa que ejecuta el script en si.
> 
> Este proceso lo unico que espera del script es que el mismo conteste con un
> "-" si hubo algun error o con un "+" si salio todo bien
> 
> ----------------------------------------------------------
>     if(err==0) {
>       pipe_in = popen(shell_cmd,"r");
>       fgets(response,5,pipe_in);
> 
>       if(response[0]=='-') {
>         err=1;
>       } else if(response[0]=='+') {
>         err=0;
>       };
>       while(fgets(response,5,pipe_in)) {
>       };
>       pclose(pipe_in);
>     };
> -----------------------------------------------------------
> 
> El script lo unico que hace es copiar algunos archivos y luego leventar el
> MySQL con el
> safe_mysqld
> 
> Espero que esto sirva! Muchas gracias!!
> Saludos!!
> 
> 
> 
> -----Mensaje original-----
> De: linux-c-programming-owner@vger.kernel.org
> [mailto:linux-c-programming-owner@vger.kernel.org]En nombre de Jorge
> Opaso Pazos
> Enviado el: Miércoles, 03 de Septiembre de 2003 18:09
> Para: linux-c-programming@vger.kernel.org
> Asunto: Re: Question!
> 
> 
> Mariano Moreyra wrote:
> 
>>Hi!!
>>First...I'd like to know if there is any kind of digest on this list to
> 
> see
> 
>>old submited messages.
>>
>>Now...I have a little problem.
>>I have a process that is listening for incoming connections on a socket.
>>That process waits for a command and then
>>forks a child to run a bash script.
>>The problems is:
>>	- When the bash script runs the safe_mysql script to run MySql engine,
> 
> it's
> 
>>like the child process never ends.
>>	  And because of that, the parent can't close the connection with the
>>client socket.
>>	- But if the bash script doesn't run the safe_mysql script...the child
>>process dies successfully and everything end
>>	  Ok
>>
>>Sorry about my english, but I hope that I made my self clear....
>>Bye!
>>
>>-
>>To unsubscribe from this list: send the line "unsubscribe
> 
> linux-c-programming" in
> 
>>the body of a message to majordomo@vger.kernel.org
>>More majordomo info at  http://vger.kernel.org/majordomo-info.html
>>
> 
> 
> envíame el script.
> 
> -
> To unsubscribe from this list: send the line "unsubscribe
> linux-c-programming" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 

English: I suspect that the problem is that safe_mysqld don't return 
until mysqld ends.
Try to execute safe_mysqld in background in the shellscript:

	if ! pgrep mysqld
	then
		/usr/bin/safe_mysqld &
	fi	
	
Castellano: El problema debe ser que no termina safe_mydqld hasta que no 
termina mysqld. Se podría solucionar llamando a safe_mysqld en 
"background" de la forma anterior.

-
To unsubscribe from this list: send the line "unsubscribe linux-c-programming" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  parent reply	other threads:[~2003-09-04 16:04 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-09-03 18:19 Question! Mariano Moreyra
2003-09-03 21:09 ` Question! Jorge Opaso Pazos
2003-09-04 13:51   ` Question! Mariano Moreyra
2003-09-04 14:05     ` Question! Luciano Miguel Ferreira Rocha
2003-09-04 14:28       ` Question! Mariano Moreyra
2003-09-04 16:04     ` Jorge Opaso Pazos [this message]
2003-09-04 17:53       ` Question! Luciano Miguel Ferreira Rocha
2003-09-04 18:41         ` Question! Mariano Moreyra
2003-09-04 19:32           ` Question! Luciano Miguel Ferreira Rocha
2003-09-05  4:16           ` Question! Jorge Opaso Pazos
2003-09-05 14:58             ` Question! Mariano Moreyra
2003-09-04 14:01 ` Question! Luciano Miguel Ferreira Rocha
2003-09-04 17:20   ` Question! Jorge Opaso Pazos
  -- strict thread matches above, loose matches on Subject: below --
2019-06-19 11:36 question… Laura
2019-06-19 11:36 question… Laura
2019-06-19 11:36 question… Laura
2019-06-19 11:36 question… Laura
2008-12-24 10:17 question ? M.Cypris
2008-12-24 15:05 ` Russell Cattelan
2008-12-24 15:52   ` Eric Sandeen
2005-10-12 18:07 question? Charlie Hollon
2005-05-19  6:23 Question Dr. Ing. Dieter Jurzitza
2005-05-19  6:23 ` Question Mark Studebaker
2002-11-18  9:49 question! Cristina Sanz Sanz
2002-11-18 10:09 ` question! Andreas Metzler
2002-05-11  2:34 Question! 녕기 신
     [not found] <fa.b7d71pv.8n891g@ifi.uio.no>
     [not found] ` <3C864815.1000009@debian.org>
2002-03-06 16:49   ` Question?? israel fdez
2002-03-06 16:08 Question?? israel fdez
2002-03-06 21:30 ` Question?? Keith Owens

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3F57629B.2000004@trofeospazos.com \
    --to=jopaso@trofeospazos.com \
    --cc=linux-c-programming@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.