execl

Sending and receiving character array using piping through argv in C

╄→尐↘猪︶ㄣ 提交于 2019-12-13 07:04:41
问题 So, I'm trying to create a pipe that sends char arrays back and forth through pipes that connect through argv[]. Right now, I'm stuck at receiving the array (param which is sent to c_param from the parent to the child.) in interface.c to receiving the characters 3 and 5 at db.c. I know that 3 and 5 are the index for argv[] that my pipes are at, but I'm not sure how to take that and print out my message in db.c. interface.c creates the pipes, forks into a parent process and a child process.

Unable to launch jar with execl()

隐身守侯 提交于 2019-12-11 12:27:08
问题 I was given a decrypt.jar and encrypt.jar file, which are used to prepare files before transmitting. When I launch the terminal and type: /usr/bin/java -jar /path/to/jar/decrypt.jar I get the output: No input file specified Which is OK! The jar works. Now in my code, when I launch the jar with execl(), I get this as output: Error: Could not find or load main class util.decrypt.jar Decryptor exited with 0 Notice that the issue here is that java tried to launch the class which is actually the