I am trying to run execl from a child process. it runs another program I wrote called producer, which takes two parameters: a single char and an int. the producer program is in the same directory as the parent. here is what I have:

if(fork() == 0){
if((execl("./producer", "producer", 'A', 0, NULL)) == -1){
perror("execl failed");
exit(1);
}

there are actually two producers, A and B, and when I run the program, I get these error messages:

execl producer A failed: bad address
execl producer B failed: bad address

why?