[Vala] regarding GLib.Process.spawn_async_with_pipes

13 views
Skip to first unread message

D.H. Bahr

unread,
Mar 12, 2012, 11:10:15 AM3/12/12
to Vala-list
Hello everyone,

I'm trying to write a simple GTK3 front-end for smbpasswd and I'm trying
to use «GLib.Process.spawn_async_with_pipes» based on the «-s» option of
smbpasswd which allows it to use stdin for password prompt.
How can I send the data to «GLib.Process.spawn_async_with_pipes»' stdin?

Best regards,
--

Sw.E. D.H. Bahr
Nova Desktop Development Leader
CESOL (Free/Libre Software Centre)
UCI (University of Informatics Sciences)
Havana, Cuba


Fin a la injusticia, LIBERTAD AHORA A NUESTROS CINCO COMPATRIOTAS QUE SE ENCUENTRAN INJUSTAMENTE EN PRISIONES DE LOS EEUU!
http://www.antiterroristas.cu
http://justiciaparaloscinco.wordpress.com
_______________________________________________
vala-list mailing list
vala...@gnome.org
http://mail.gnome.org/mailman/listinfo/vala-list

Jens Georg

unread,
Mar 13, 2012, 6:04:04 AM3/13/12
to vala...@gnome.org
Hi,

> I'm trying to write a simple GTK3 front-end for smbpasswd and I'm trying
> to use «GLib.Process.spawn_async_with_pipes» based on the «-s» option of
> smbpasswd which allows it to use stdin for password prompt.
> How can I send the data to «GLib.Process.spawn_async_with_pipes»' stdin?

You need to set up an IOWatch on the resulting standard_input fd and
check if the app is ready for receiving input; you'll probably also
connect to stdout and stderr to properly interact with the command-line
app.

D.H. Bahr

unread,
Mar 13, 2012, 7:56:23 AM3/13/12
to vala...@gnome.org
El Tue, 13-03-2012 a las 11:04 +0100, Jens Georg escribió:
> Hi,
>
> > I'm trying to write a simple GTK3 front-end for smbpasswd and I'm trying
> > to use «GLib.Process.spawn_async_with_pipes» based on the «-s» option of
> > smbpasswd which allows it to use stdin for password prompt.
> > How can I send the data to «GLib.Process.spawn_async_with_pipes»' stdin?
>
> You need to set up an IOWatch on the resulting standard_input fd and
> check if the app is ready for receiving input; you'll probably also
> connect to stdout and stderr to properly interact with the command-line
> app.
>

Thanks for tips , I'll check that asap..

Best regards,
--

Sw.E. D.H. Bahr
Nova Desktop Development Leader
CESOL (Free/Libre Software Centre)
UCI (University of Informatics Sciences)
Havana, Cuba


Fin a la injusticia, LIBERTAD AHORA A NUESTROS CINCO COMPATRIOTAS QUE SE ENCUENTRAN INJUSTAMENTE EN PRISIONES DE LOS EEUU!
http://www.antiterroristas.cu
http://justiciaparaloscinco.wordpress.com

Reply all
Reply to author
Forward
0 new messages