For Solaris, you could try the procfs module from CPAN. Even though this module still seems quite young, this quote sounds hopeful:
Brian Farrell sent a very useful patch which handles
inspection of argv and environment of processes
other than the currently running process.
I imagine that this is probably just the initial environment (just like the environ
file under linux), but that seems to be what you want?
Otherwise, although I see you say you don't want to fork, a simple solution would probably to crank ~20 lines of C to produce a small program that just spits out the environment on Solaris as the exact equivalent of the Linux environ
file. I have something very similar in C already. If you're interested, I can post it.
EDIT (after reading OpenSolaris pargs.c): The environment buffer is reallocated under Solaris when the environment changes, so the psinfo pointer may be invalid. For a bullet proof solution, you need to hunt down _environ. That's all probably more hassle than you need... pargs -e <pid>
might be a nicer alterative to UCB ps(1)
if you do go the fork route, though.