To me that is a correct assumption. The child is a complete copy of the parent, including all open descriptors.
If you're able to perform a fork(), then you should be able to test this in a similar manner:
Code:
pid_t pid;
pid = fork();
if(pid < 0) {
// error condition, check errno
}
else if(pid == 0) {
// This is the child, so invoke a call to the library to see if it works
}
else {
// This is the parent, unless you wish to wait for the child to complete, nothing to be done here
// you can of course validate here, or above the call to fork() to verify that the parent can call library
// functions. A helpful call would be waitpid(2), declare int w_status as a variable.
waitpid(pid, &w_status, 0);
// This would wait for the child to terminate and then you can invoke test macros against w_status.
// see "man -S 2 waitpid for information on the various macros you can use to test the outcome of your child.
}