Hello!

On Sunday, 26. Juni 2016, 18:05:26 CEST wrote Mr. Dan Johansson:
> The following code snippet compiles find but when run it just hangs forever

I compiled it (after simpel copy’n’paste) and run it at x86 and and Raspberry 
Pi first gen (B+). Hung nowhere. 

> 
> $ cat x.c
> #include <stdio.h>
> #include <unistd.h>
> #include <crypt.h>
> 
> int main() {
>         printf("Running test\n");
>         char *encrypted = crypt("blablabla","ab");
>         if(!encrypted || strcmp(encrypted,"ab.h7fshjf89f")) {
>                 printf("Fail\n");
>         } else {
>                 printf("OK\n");
>         }
> }
> 
> $ gcc -o xout x.c -lcrypt
> 
> $ ./xout
> Running test
> 
> <here the program just hangs and needs to be killed with ^C>
> 
> The same code runs fine on my desktop.
> Any suggestions what could be my problem?

=> My output at ~amd64 and Raspberry Pi (~arm) was:
=======================
fancy_user @ fancy_gentoo_host$ ./xout
Running test
Fail
=======================
Maybe a strace (with dev-util/strace) tells you more (just a guess).
If I can help with more specific informations and/or tests feel free to ask :)


Greetings,,
Nils

Attachment: signature.asc
Description: This is a digitally signed message part.

Reply via email to