venerdì 29 gennaio 2010

i capofamiglia exec

#include<stdio.h>
#include<stdio.h>
#include<sys/signal.h>
#include<unistd.h>


main()
{
int i, status, pid;

pid=fork();
if(pid==0){
printf("child\n");
execl("/bin/ls","ls",".", "-l", 0);

}
else{
printf("parent\n");
wait(&status);
}
}


/*______________________________________________________________________________*/


#include<stdio.h>
#include<stdio.h>
#include<sys/signal.h>
#include<unistd.h>

main()
{
int i, status, pid;
char *myargs[]={"ls","-l","/",NULL};
pid=fork();
if(pid==0){
printf("child\n");
execv("/bin/ls",myargs);

}
else
printf("parent\n");
wait(&status);
}

domenica 24 gennaio 2010

Configurazione Alpine

S
C
nickname:
smtp: smtp.gmail.com:587/tls
Inbox: imap.gmail.com/ssl/user=user@gmail.com
E

(..Done..) XD

sabato 23 gennaio 2010

I cover the waterfront



I cover the waterfront, watchin' the ship go by
I could see, everybody's baby, but I couldn't see mine
I could see, the ships pullin' in, to the harbor
I could see the people, meetin' their loved one
Shakin' hand, I sat there,
So all alone, coverin' the waterfront

And after a while, all the people,
Left the harbor, and headed for their destination
All the ships, left the harbor,
And headed for their next destination
I sat there, coverin' the waterfront

And after a while, I looked down the ocean,
As far as I could see, in the fog, I saw a ship
It headed, this way, comin' out the foam
It must be my baby, comin' down
And after a while, the ship pulled into the harbor,
Rollin' slow, so cripple
And my baby, stepped off board
I was still, coverin' the waterfront

Said 'Johnny, our ship had trouble, with the fog
And that's why we're so late, so late
Comin' home, comin' down' .

(John Lee Hooker)

martedì 5 gennaio 2010

aggiornare gli ebuild

gli ebuild sono file che contengono le info necessarie al Portage di Gentoo per la gestione dei pacchetti.
si trovano in /usr/portage.
per aggiornare gli ebuild : emerge --sync
("e' il comando che non trovavo...visto che questo 2010 si e' aperto con Sabayon...sara' un anno parecchio dolce...ed e' il comando che mi ha aperto il mondo della gestione pacchetti : Il Portage, lo confrontero' con il mitico apt").
i comandi:
emerge --search
emerge //installa
emerge --fetchonly //scarica il codice sorgente
emerge --unmerge //disinstalla
emerge --update


...configurando il kernel ho poi letto riguardo i file di configurazione: (direttamente tradotto dal man):
Portage ha una funzione speciale chiamata "protezione dei file di configurazione". Il compito di questa caratteristica e' evitare che i file di configurazione vengano sostituiti.
[...]
Quando Portage installa un file in una dir protetta ogni file esistente NON viene sostituito, e un file dello stesso nome esiste gia', Portage lo cambia facendolo iniziare per ._cfg0000_foo.
Sara' l'amministratore a fondere manualmente i nuovi file di configurazione ed evitare cambiamenti inaspettati.

Per fare un update di un file che ha bisogno :
find /etc -iname `._cfg????_*`

Run minikube with podman on Fedora

After install minikube as described in the documentation , set rootless property to true to use Podman without sudo: minikube config set roo...