# Syscall similar to kenv in Linux?



## figo (May 26, 2009)

Hi,

Does anyone know if there's syscall in Linux that serves the function of kenv in freeBSD? I know setenv/getenv/printenv, but they're process-based userspace environment var settings (freeBSD has them all also). Here kenv means kernel env.

There's another fundamental question:
Is there kernel environment variables in Linux at all?

thx~


----------



## BuSerD (May 26, 2009)

figo said:
			
		

> Hi,
> 
> Does anyone know if there's syscall in Linux that serves the function of kenv in freeBSD? I know setenv/getenv/printenv, but they're process-based userspace environment var settings (freeBSD has them all also). Here kenv means kernel env.
> 
> ...



figo,

Your question about the linux kernel could, should, and (hopefully)would be responded to on the Linux Kernel Mailing List. They would of course give you the most up to date and informed response.


----------



## figo (May 27, 2009)

BuSerD said:
			
		

> figo,
> 
> Your question about the linux kernel could, should, and (hopefully)would be responded to on the Linux Kernel Mailing List. They would of course give you the most up to date and informed response.



Thanks, I think my question is not very clear anyway. I found how to solve the problem.


----------



## DutchDaemon (May 27, 2009)

Well, since this forum is supposed to be a nice reference tool, please post your findings.


----------



## figo (May 28, 2009)

DutchDaemon said:
			
		

> Well, since this forum is supposed to be a nice reference tool, please post your findings.



Not exactly a solution..cause there's no way to get kernel environment var if there's no API provided, except writing a syscall ourself.


----------

