commit 3416412c0e0c6261aed0c330ee3f6ab33d7340e1 Author: Pau Date: Thu Sep 19 19:24:37 2024 +0200 dos primeros ejercicios de procesos diff --git a/README.md b/README.md new file mode 100644 index 0000000..e69de29 diff --git a/proceso1 b/proceso1 new file mode 100755 index 0000000..5cfd2a9 Binary files /dev/null and b/proceso1 differ diff --git a/proceso1.c b/proceso1.c new file mode 100644 index 0000000..d529f3e --- /dev/null +++ b/proceso1.c @@ -0,0 +1,11 @@ +#include +#include +void main() { + printf("Ejemplo de uso de system():"); + printf("\n\tListado del directorio actual y envio a un fichero:"); + printf("%d", system("ls > ficherosalida.txt")); + printf("\n\tAbrimos con nano el fichero ...:"); + printf("%d", system("nano ficherosalida.txt")); + printf("\n\tEste comando es erroneo: %d", system("msword")); + printf("\nFin del programa"); +} diff --git a/proceso2 b/proceso2 new file mode 100755 index 0000000..806bd72 Binary files /dev/null and b/proceso2 differ diff --git a/proceso2.c b/proceso2.c new file mode 100644 index 0000000..b9123ff --- /dev/null +++ b/proceso2.c @@ -0,0 +1,8 @@ +#include +#include +void main(){ + printf("Ejemplo de uso de excel():"); + printf("\n\tListado del directorio actual:"); + execl("/bin/ls","ls","-l", (char *)NULL); + printf("\nEsta instruccion no se llega a ejecutar"); +}