You should use _exit(2) instead of exit(3) in your daemon initialization code (forking twice). It's because exit(3) will call the cleanup routines that registered by atexit(3) or on_exit(3), in terms of C++ program, if you have global or static CPP objects (not allocated in heap), they will be destroyed when exiting. E.g., if one object which creates a Unix Domain Socket (or a tmp file) in constructor , and destroys it in destructors, you will lose it in your grandchild process (the daemon process). Unix Programming FAQ section 1.1.3 has documented it very clearly.
And there is no daemon(3) implementation in Solaris' libc, you could use the one provided in Unix Programming FAQ, Daemon Utility functions.
Here is the Chinese Version of Unix Programming FAQ.
After I fixied the exit(3) problem in scim_utility.cpp, scim-helper-manager works now (the following picture is scim-tomoe handwritting IM for Japanese), and the xim frontend also works with ximcp protocol.


