Questions tagged as 'linux'

6
answers

Programming in C for ARM

I will start a project in C that will have as a% of a board Colibri T20 processor with NVIDIA Tegra 2 ARM , running a lightweight version of Linux. I would like to know if, in addition to having to use a processor-compatible cross compiler...
asked by 20.12.2013 / 18:54
3
answers

What does ": - -" mean in C language?

In a Linux kernel library, specifically this: / usr / include / linux / kernel.h , there is a macro with a strange code for me: /* Force a compilation error if condition is true, but also produce a result (of value 0 and type size_t), so th...
asked by 04.02.2014 / 12:04
2
answers

Meaning of "__"

In the Linux kernel implementation , I came across this statement on the line 89: #define _THIS_IP_ ({ __label__ __here; __here: (unsigned long)&&__here; }) I know that in C , symbols starting with a _ followed by a ca...
asked by 28.09.2016 / 21:26
4
answers

How to schedule a recurring task in linux?

What command can I use to schedule a recurring task on linux? I would also like to send the command return by email automatically. What is the most appropriate tool?     
asked by 29.01.2014 / 18:31
4
answers

How to programmatically respond to a command on the Linux terminal?

I have a Python script that runs a particular command on the system. This command waits for a password to be entered immediately, the only way to do this is to pass the password via the argument. I wanted to know if there is any way to execut...
asked by 28.01.2014 / 18:00
4
answers

How to deal with a kite process?

Analyzing the linux API I noticed that an interesting structure is possible: #include <unistd.h> #include <stdlib.h> int main() { while (1) { if (fork()) exit(0); // Altera meu pid setpgid(0, 0); // Cria um...
asked by 31.01.2014 / 15:54
1
answer

Which programming languages support Linux and Windows?

The question is already in the title, however to make it clearer: What languages do I write a single code to, and run on both Linux and Windows? Example C . Except some commands like system("cls"); system("clear"); ....
asked by 23.11.2015 / 14:17
1
answer

What happens to a Cronjob of 2:30 if the server falls at 2:28 and only come back 5 minutes later?

I do not know if the question is confusing, but it's that I've used a lot of Cronjob on my systems these days and I do not want to have problems. So I'll illustrate my concern with a hypothetical situation. Let's say I have a Cronjob programm...
asked by 02.05.2016 / 22:00
2
answers

Permission denied when moving file with move_upload_file on Linux server

I'm trying to use move_upload_file to move a file uploaded by the user to their final destination: $pasta = '../../public_html/admin/helpdesk/ticket/uploads/'; if (!empty($_FILES['img']['name'])) { foreach ($_FILES["img"]["error"...
asked by 21.01.2014 / 12:53
1
answer

How to extract the path to the file

In a variable containing the path to a file and its name, the file name can be extracted as follows: #!/bin/bash filenamepath="/caminho/para/ficheiro.pdf" filename=$(basename $filenamepath) What results in ficheiro.pdf in variable...
asked by 26.03.2015 / 11:20